help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to boot a memory stick image of a hard drive?


From: Pascal Hambourg
Subject: Re: How to boot a memory stick image of a hard drive?
Date: Sat, 8 Jul 2017 10:00:08 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

Le 07/07/2017 à 21:51, address@hidden a écrit :

I am using latest GRUB2. I have made an image copy of a Linux system running on a hard drive with a reiser filesystem. [ dd if=/dev/sda of=/dev/sdc ] sda is a PATA hard drive and sdc is a memory stick.

   I can mount the memory stick on a linux box and all seems OK.

   I try to start that image with grub.

   grub> linux (hd2,msdos2)/boot/vmlinuz

All seems OK. I can see on the memory stick that Grub reads vmlinuz as expected.

grub> boot starts the image. But the image complains that it cannot find its root filesystem.

   I have tried many variations on the root=line to no avail.

   grub> linux (hd2,msdos2)/boot/vmlinuz root=/dev/sda2

I was expecting grub to do whatever magic was needed to make the usb stick available to the kernel as /dev/sda2.

GRUB does not do anything beyond loading the kernel and initramfs and passing command-line parameters to the kernel. It is up to the kernel to find the root filesystem.

Note that :
- The kernel provided by most common distributions cannot mount the root filesystem by itself and requires an initramfs (formerly initrd) to do the job.

- /dev/sd* device names are nowadays considered not persistent when there are more than one device, so using UUID or LABEL instead is preferred. But this requires an initramfs, because the kernel cannot find a filesystem UUID or LABEL. It can only find a GPT partition UUID, but you use a DOS/MBR partition scheme.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]