help-grub
[Top][All Lists]
Advanced

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

booting a clone from a /dev/md0 disk as single ext4 disk


From: John Griessen
Subject: booting a clone from a /dev/md0 disk as single ext4 disk
Date: Sun, 23 Oct 2016 11:09:26 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0

On 10/22/2016 01:58 AM, Andrei Borzenkov wrote:
I was starting from a mdadm raid1 boot to /.  I copied that with rsync,
> and booting
> the copy on a single hard drive, grub2 gives me kernel panics
Once kernel is loaded, grub2 ceases to exist so it hardly can give you
kernel panic (unless you mean *grub2* kernel here).

I apologize for my inexact terminology.  I should have said, "grub2
boots and the kernel runs for 5 seconds, but then panics.


> and cannot utilize a hand written grub.cfg menu entry like this:
>
> menuentry 'Debian stretch/sid Linux 4.7.0-1-amd64' --class debian
> --class gnu-linux --class gnu --class os {
>   load_video
>   insmod gzio
>   insmod part_msdos
>   insmod diskfilter
>   insmod mdraid1x
>   insmod ext2
>   set root=UUID=87d52f42-838c-4418-a37e-f0d0a63ed8ed
This line is bogus. I'm surprised code after this works at all.

>     echo 'Loading Linux 4.7.0-1-amd64 ...'
>     linux /boot/vmlinuz-4.7.0-1-amd64
> root=UUID=87d52f42-838c-4418-a37e-f0d0a63ed8ed  ro rootdelay=20
>     echo 'Loading initial ramdisk ...'
>     initrd /boot/initrd.img-4.7.0-1-amd64
> }
>

hints about where to read next would be helpful.

On 10/22/2016 01:58 AM, Andrei Borzenkov wrote:
>  There is nothing new here. grub2
> "sample configuration" script is using UUIDs

I will search that out and pattern after it.

>> Do I need to get a chroot
>> > on the copy's / to run to do that?
>> >
> Yes, grub-mkconfig (which is called by update-grub2) expects to be run
> in target system environment, so you need chroot.

Thanks, I'll learn that elsewhere.

Can you run
> dpkg-reconfigure from outside of installed root at all? I do not see any
> option to specify where root is located.

I doubt dpkg-reconfigure is ever able to do anything but affect an installed 
debian linux system
from within, or with chroot from the same kernel and probably the same 
initrd.img.

Any hints about where to study the boot process as far as making cloned drives 
that started
with boot from /dev/md0 run as single drives will be appreciated.  Thanks...  JG





reply via email to

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