Load Ubuntu into your mobile hard drive

Source: Internet
Author: User
I saw a post on installing Ubuntu on a mobile hard disk on the Ubuntu Forum. I thought it was a bit interesting. I tried it and had some experience. I 'd like to share it with you now. My steps are as follows: 1. Start with livecd, plug in the mobile hard disk, and perform all the installation steps properly, but select your mobile hard disk when selecting the installation target, there is no difference between partitioning and hard disks. However, we recommend that you use windows fat32, which is better at the end of Linux, so that you can easily

I saw a post on installing Ubuntu on a mobile hard disk on the Ubuntu Forum. I thought it was a bit interesting. I tried it and had some experience. I 'd like to share it with you now.

My steps are as follows:

1. Start with livecd, plug in the mobile hard disk, and perform all the installation steps properly, but select your mobile hard disk when selecting the installation target, there is no difference between partitioning and hard disks. 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 see the partition.

Run 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. Replace S03xconfig in the attachment. copy the sh file to/etc/rc2.d/. In this way, Ubuntu can detect some hardware drivers to complete the above steps, you need to change it to another point: restart windows, run a grubinit_gui program in the files folder in the attachment, and select the hard disk on your machine, select "do not detect soft drive at startup" and "prioritize the original MBR", and click Install

To export root (hd0, 0) 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.

The above are some of my operations based on my experience. There may be some places that are not suitable for your machine. It should be a reference. Haha

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.