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: jmh6
Subject: Re: How to boot a memory stick image of a hard drive?
Date: Sat, 8 Jul 2017 03:21:55 -0400 (EDT)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)


Hi Pascal,

   Thank you very much for your incisive answer.

I miss the simplicity of the LILO loader or at least so it seemed at the time!

I am using a Debian distro - Knoppix 6.4.3 - pretty old but known to be reliable.

It sounds like I need to teach that kernel how to find and mount its root filesystem. Previously I would fiddle the MBR with fdisk and eventually get things to run.

With the USB now in the picture, I am not sure that can be done with that kernel?

At least I now have a mountable image of what could be copied onto another pata hard drive and probably made to run.

   Thanks again for you VERY helpful answer.

   warm regards,
   John


On Sat, 8 Jul 2017, Pascal Hambourg wrote:

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.

_______________________________________________
Help-grub mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-grub




reply via email to

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