Place the UbuntuLinux system on your mobile hard disk

Source: Internet
Author: User
Article Title: place the UbuntuLinux system on your mobile hard disk. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems and open source, and other basic categories 1. Start with livecd, plug in the mobile hard disk, and then perform all the installation steps properly, you only need to select your mobile hard disk when selecting the installation target. There is no difference between how to partition a category and a common hard disk. However, we recommend that you use windows fat32, which is better at the end, so that your mobile hard disk can be used as a backup in windows, in addition, it is more convenient to adjust the partition size (I had a bad experience, that is, I wanted to adjust the partition of windows, but I followed the partition of linux after drive C, then, the D, E, and F disks are followed. After the adjustment, the windows pqmagic cannot move the linux partition, and cannot skip the linux partition to operate the subsequent windows partition ).
 
2. After the installation is complete, your mobile hard disk can be started on your machine. Note that it is only on your machine, but on another machine, it is still unavailable, the key lies in that the grub boot is installed on your hard disk instead of the mobile hard disk (I don't know why, as if the ubuntu installation program is configured in this way ), you need to select c for editing when the boot machine displays the boot selection screen, that is, enter the grub command prompt status (this is an English comment below when the selection interface appears, I know how to do it myself)
 
Run root (hd1, X)
 
Hd1 stands for the mobile hard drive (because grub is now on the machine's hard drive, the mobile hard drive is hd1 for grub)
 
X indicates the partition where/boot is located. You can check the partition by yourself. Generally, enter root (hd1, and press the tab key to view the partition. Then execute setup (hd1)
 
In this way, grub is installed on the mobile hard disk. Run the boot command again. You should be able to access ubuntu. Then, modify the menu. lst file in/boot/grub as appropriate. The root line in this file should be changed. Specifically, change the root line and the original hd0 to hd1, because your mobile hard disk is the second disk for your computer, although it is used for startup.
 
The advantage of doing so is to avoid changing the UUID in menu. lst, Which is troublesome.
 
3. Copy the S03xconfig. sh file in the attachment to/etc/rc2.d/, so that ubuntu can detect some hardware drivers.
 
For a machine that cannot be started using usb, you need to change the configuration after completing the preceding steps:
 
Restart windows, run a grubinit_gui program in the files folder in the attachment, select the hard disk on your machine, and select "do not detect the soft drive" and "prioritize the original MBR ", click "Install grldr" in the attachment and "menu" under "/boot/grub" in linux. copy the lst file and place it in the c root directory, where menu. you need to modify the lst file and change all the ubuntu options to root (hd0, 0), which means to boot from the machine's hard disk. Then/boot in the vmlinuz-2.6.22.14-generic and initrd-2.6.22.14-generic (file name may be wrong, too long, unclear, huh) to test out the C disk.
 
The reason is as follows: when grub Then guides linux, it loads the vmlinuz and initrd files mentioned above into the memory. That is to say, the location specified in grub is the location where the two files are located, after these two files are in the memory, they will start linux on their own. This is easy to do, as long as these two files can be loaded into the memory, the file will find the system in the mobile hard disk based on something (which may be the uuid set in grub or something.
 

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.