Automatic logon to non-Linux partitions

Source: Internet
Author: User
Article title: automatic logon to non-Linux partitions. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Recently, my "landline" is equipped with a 30 GB hard disk, coupled with the original 3.2 GB, it seems that I suddenly walked into the "president set" from the "shantytowns ". The next step is to allocate rooms for several children. Boss Windows 98 (FAT16, FAT32 partition) is older, and undertakes program development, text processing, Internet access and other major work, accounting for 20 GB; second child Windows NT Workstation (NTFS partition) it is basically the same as the work of the boss, but the workload is smaller, accounting for 10 GB. although Red Hat Linux 7.0 is my favorite, it is still in the growth stage, the task is also temporary, so I had to give him 3.2 GB. Small is a little small, but it is a single room. Unlike the old man and the second child, they don't look up (both can identify FAT16 partition ).
  
The room was allocated, and I was very satisfied with the three, but I always felt a heart disease was gone. For example, in the past, when surfing the Internet in a Windows environment, some things were stored on a logic disk in the FAT16 (FAT32, NTFS) partition. when it was in a Linux environment, to browse or use these things, you must first use a similar command:
  
Mount-t msdos/dev/hda1/mnt
  
Log on to the logical disk where the data is stored, so that the Linux operating system can recognize the data. In a Linux environment, when something is stored on an Ext2 partition hard disk, it cannot be accessed and used in a Windows environment. Is there a solution to this inconvenience?
File sharing between Linux and Windows
In general, Windows operating systems can only use files on their own partitions (FAT16 \ FAT32 \ NTFS) (except for optical disks and other media), while Linux operating systems support multiple file systems, including the first Linux minix, ext2 is currently in use, MS-DOS FAT, Win95/98 VFAT, network file system nfs, Windows NT ntfs, OS/2 hpfs and so on. In other words, the Linux operating system can access files in the Windows operating system, but the Windows operating system cannot access files in the Linux operating system.
  
This tells us to solve the problem mentioned above, one way is to create a shared operation directory on the Windows partition. To save the information shared between the two operating systems to this directory, the Windows operating system can directly access this directory, in Linux, the mount command is used to mount the logical disk of the directory, and then access the disk. Alternatively, you can directly use the mtools command in Linux. Currently, mtools supports VFAT (a Windows 95/98 file system), which can automatically convert Linux long file names to long file names supported by VFAT, and generate a short file name in 8.3 format (mtools knowledge is not described here, please refer to relevant materials ).
  
Two implementation schemes
Through the above analysis, there are roughly two ways to implement this function: one is to manually type commands, and the other is to program in Linux. However, in view of the user-friendly and easy-to-use Windows environment, we will focus on how to automatically implement it in the existing Linux Desktop Environment (GNOME, KDE. After some exploration, I will summarize the following:
  
The operating system in the instance is Windows 98 SE and Red Hat Linux 7.0 with the kernel 2.2.17. The C logical disk in the FAT16 partition is shared and mounted to the mnt directory in Linux.
  
Implementation method in GNOME
1. enter the GNOME environment.
  
2. click the main menu button in the lower-left corner of the screen (it looks like the iconic footprint pattern of GNOME), and select "Panel"> "Add to Panel"> "Launcher" in the pop-up menu ".
  
3. in the "Create Launcher applet" window that opens, select the "Basic" tag.
  
4. in "Name", enter "MountDriveC", input "mount-t auto/dev/hda1/mnt" in "Command", and select "Application" in "Type ", click "Icon" to select an Icon you like. Click "OK" to close the window. you can see that the bar panel at the bottom of the desktop has an icon of your choice.
  
5. the settings have been completed. During use, you only need to click the representative icon on the panel to automatically implement the mount function. then, double-click the "Home Directory" icon on the desktop, in the window that appears, select mount to the/mnt directory under Linux to view all files under drive C in Windows.
  
Implementation method in KDE
1. enter the KDE environment.
  
2. click the "templete" icon on the desktop to display all the files in the directory.
  
3. right-click the "program" file and drag it to the desktop with the left button. in the displayed menu, select "copy, A "program" icon is displayed on the desktop.
  
4. right-click the "program" icon and select "property" in the pop-up menu ". Open the property window, select the "Generral" label, and change FileName to MountDriveC. kdelnk, select the "Execute" label, and type "mount-t auto/dev/hda1/mnt" under "Execute ". Click OK to close the window.
  
5. click open the "AutoRun" folder on the desktop and drag the file named MountDriveC to the folder. Close the "AutoRun" folder.
  
6. click the "templete" icon on the desktop, open the folder, right-click the "Device" file, drag it to the desktop, and select "copy" in the pop-up menu ", A Device icon is displayed on the desktop.
  
7. right-click the "Device" icon and select "property" in the pop-up menu ". Open the "property" property window, select the "Generral" tag, and change FileName to DriveC. kdelnk, select the Device tag, type "/dev/hda1" under "Device", and type "/mnt" under "Mount Point ". Click OK to close the window.
  
8. the settings have been completed. Log out of the KDE desktop environment and save the changes. Start KDE again and click the "DriveC" icon on the desktop. then, all the files in drive C of the Windows operating system are displayed.
  
In the Linux Desktop Environment (KDE and GNOME), the logical disk C is automatically mounted to the FAT16 partition, and the same file directory can be shared between the Linux operating system and the Windows 98 operating system.
  
Discussion
Linux is not as difficult as we think, but it also has user-friendly and easy-to-use features. This article does not explain each operation step, nor describes how to share the NTFS partition of WindowsNT with Linux and how to implement this function through programming. I hope you can think further, raise more questions and provide better and more reasonable solutions.
  
I personally think that the popularity of Linux is unstoppable and imperative. I will not go into details about the advantages of Linux. I just want to talk about the reasons for lagging Linux popularity.
  
The fact is that the Windows operating system is installed on a wide range of machines, while Linux is like a morning star; many users use Windows; few users use Linux; many related products and software on Windows; linux has fewer products and software, Windows has fewer advertisements, and Linux has fewer advertisements.
  
Habitual thinking: wearing Windows colored glasses to examine Linux.
  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.