How to solve the problem of installing Ubuntu to mobile hard drive & grubrescue

Source: Internet
Author: User
I want to make a good effort in linux and start with Ubuntu, but it is very troublesome to think about how to configure it in linux. It is best to install a system for a long time, so I will install ubuntu on a mobile hard disk, this makes it easy to use anywhere. how do I install it on a mobile hard drive in ubuntu? 1. First make a U disk version of livecd. This can be used FedoraLiveUSBCreator, compatible with Ubuntu, the URL is https://fedorahosted.org/liveu

I want to make a good effort in linux and start with Ubuntu, but it is very troublesome to think about how to configure it in linux. It is best to install a system for a long time, so I will install ubuntu on a mobile hard disk, this makes it easy to use anywhere.

How do I install it on a mobile hard drive in ubuntu?

1. First make a U disk version of livecd. This can be used with Fedora LiveUSB Creator, compatible with Ubuntu, the URL is https://fedorahosted.org/liveusb-creator/, just a few minutes to get it done
2. select to start from the USB flash drive and enter the livecd system, which is equivalent to the trial version. choose to install Ubuntu, pay attention to the selection of mobile hard disk partition, the mount point is the simplest is the root directory and swap, other mounting in order; and finally "Install Boot guide device" select mobile hard disk, such as sda, rather than a partition, such as sda1, so that the system can start from the mobile hard disk.

You only need to install ubuntu in two steps. Similarly, if you install ubuntu on a USB flash drive.

------------ Split line ----------------

After the installation, it is successfully started on your computer, but it cannot be changed. according to the knowledge of linux boot, the boot sequence is BIOS, MBR, BootLoader, and OS. the system's grub (GRand uniied Bootloader) has been installed on the mobile hard disk. When starting from the mobile hard disk, MBR can directly identify Grub to start the system, the successful test on your computer indicates that the installation was successful.

Tips. In fact, this version of the system is cloned to a mobile hard disk using UCloner, which may be the cause.

When you start grub on another computer, grub rescue cannot be started.

Error: unknown filesystems
Grub rescue>

Most of the problems encountered on the Internet are caused by the re-partitioning of the disk in windows after the windows + ubuntu dual system is installed. It is similar to running ubuntu on another computer on the mobile hard disk: why is grub startup related to other disks or partitions?

I. in grub rescue, use ls to view disks and partitions. If ls (hd0, 6)/boot/grub displays information, it means (hd0, 6) is the partition for installation/boot, run the following command to access the system:

Set root = (hd0, 6)
Set prefix = (hd0, 6)/boot/grub
Insmod normal
Normal

# After getting into ubuntu
Sudo update-grub
Sudo grub-install/dev/sda, but each of my ls partitions has an error. the boot and prefix displayed by the set command all point to the actual '/' partition.

2. Continue searching for the solution on the internet, mostly reinstalling GRUB from the LiveCD, as shown below:

Sudo mount/dev/sda4/mnt
Sudo grub-install -- boot-directory =/mnt/boot/dev/sda

# Sda4 is the/partition, so sda is the disk

# Back in Ubuntu
Sudo update-grub but I have tried this method and it is not successful.

3. persistently search and finally find this sentence: Some bioses have a maximum read capability of 137 GB and will therefore not find boot files which are on the disc after that limit.

Some bios have limited disk reading capabilities and can only read the first GB of content. this was first discovered because the mobile hard drive has stored several hundred GB of data in front of it, and the free space is directly divided into linux partitions for saving effort. reinstall linux to the front of the mobile hard drive, and you can start it everywhere !!

P.s. The following are two startup information analysis tools. If you have any other questions, you can check them and post them to the Forum to help you with the analysis:

1. Boot-Repair: https://help.ubuntu.com/community/Boot-Info
2. Boot Info Script: http://bootinfoscript.sourceforge.net/

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

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.