grub-devel
[Top][All Lists]
Advanced

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

Boot from RAW disk image


From: moo can
Subject: Boot from RAW disk image
Date: Tue, 12 Feb 2019 14:48:59 +0000 (UTC)

Dear developers,

To update many old production servers never updated I need to use an old CentOS 5.6 live CD (CentOS-5.6-i386-LiveCD.iso) which does not support loopback method. Impossible to get it to work, impossible to boot it always cannot find root file system!

dd'ing this iso to an USB key does not work too. LiveCD does not boot.

So I have using severals method and created a HDD which is booting and working.

This HDD has the following settings:
Disk /dev/sdb: 775,2 MiB, 812851200 bytes, 1587600 sectors 
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos 
Disk identifier: 0x8a965d8b

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  * 128 1583231 1583104  773M  c W95 FAT32 (LBA)

I made a raw image of this disk using dd.

Here is the settings of the disk image:
Units: sectors of 1 * 512 = 512 bytes 
Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes 
Disklabel type: dos Disk identifier: 0x8a965d8b

Device                                                                
CentOS-5.6-i386-LiveHDD-Working.img
Boot Start     End Sectors  Size Id Type
*      128 1583231 1583104  773M c W95 FAT32 (LBA)

if I try to boot directly from GRUB the physical HDD it is working.

grub ls return: (hdd) (hdd,msdos1)

set root=(hdd)
chainloader +1
But if I try to boot from the raw disk image
insmod part_msdos
insmod fat
loopback hdd /boot/img/CentOS-5.6-i386-LiveHDD-Working.img

grub ls return : (hdd) (hdd,msdos1)

set root=(hdd)
chainloader +1
This does not boot and I have an empty screen with a blinking cursor.

I tried to export MBR from the physical disk using dd
dd if=/dev/sdb of=~/CentOS-5.6-i386-LiveHDD-Working.mbr bs=512 count=1
and boot from it
insmod part_msdos
insmod fat
loopback hdd /boot/img/CentOS-5.6-i386-LiveHDD-Working.img
set root=(hdd)
chainloader (hd0,gpt1)/boot/img/CentOS-5.6-i386-LiveHDD-Working.mbr
This does not boot too and I have an empty screen with a blinking cursor.

Is it possible to boot from a RAW disk image ?

Kind Regards
Fabien




reply via email to

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