SystemRescueCD boot iso from within grub2

Post in this forum for problems at boot time, if there was no problem for burning the disc. For example can't find the CD, or strange errors when you press enter at the very first prompt.
pmt
Posts: 3
Joined: 26 Dec 2009, 12:43

Re: SystemRescueCD boot iso from within grub2

Postby pmt » 26 Dec 2009, 12:53

mhm.

I tried it with 1.3.3 as well as with 1.3.4 but it didn't work for me ??

My iso's resides in /boot/iso

My grub.cfg menuentry is:

menuentry "SystemRescueCD 4" {
loopback loop /boot/iso/systemrescuecd-x86-1.3.4-rc1.iso
linux (loop)/isolinux/rescuecd isoloop=/boot/iso/systemrescuecd-x86-1.3.4-rc1.iso rdinit=/linuxrc2
initrd (loop)/isolinux/initram.igz
}

couldn't find any mistake in that, nevertheless, unfortunately, I get the mentioned error message after booting:

...
!! Media not found
...

after that, it's booting into Busybox

anybody any idea?

pmt
Posts: 3
Joined: 26 Dec 2009, 12:43

Re: SystemRescueCD boot iso from within grub2

Postby pmt » 27 Dec 2009, 14:05

seems to be some issue with qemu

I have tested the flash drive using qemu: sudo qemu -m 512 -hda /dev/sdb
in that case, booting fails at a late stage (couldn't find media)

This does NOT happen, in case I shutdown my laptop, and boot via BIOS. In that case, everything works fine :-)

Maybe an issue with Grub2 device.map ... but although I changed it, so that /dev/sdb is first hd, it doesn't work ??

Janneggers
Posts: 9
Joined: 28 Oct 2009, 08:48

Re: SystemRescueCD boot iso from within grub2

Postby Janneggers » 20 Jan 2010, 07:22

I wasn't able to boot through qemu as well, it will boot grub, but not beyond.
I think though this is an issue with grub2 and qemu and not sysrescd related.

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: SystemRescueCD boot iso from within grub2

Postby admin » 28 Jan 2010, 09:25

The modifications are now in the standard init script with SystemRescueCd-1.4.0-beta2 so you don't have to use "rdinit" any more.

Code: Select all

menuentry "SystemRescueCD" {
    loopback loop /boot/iso/systemrescuecd-x86-1.4.0-beta2.iso
    linux (loop)/isolinux/rescuecd isoloop=/boot/iso/systemrescuecd-x86-1.4.0-beta2.iso
    initrd (loop)/isolinux/initram.igz
}

pmt
Posts: 3
Joined: 26 Dec 2009, 12:43

Re: SystemRescueCD boot iso from within grub2

Postby pmt » 30 Jan 2010, 02:08

Great, thanks for that!

mir
Posts: 10
Joined: 13 Mar 2010, 20:23

Re: SystemRescueCD boot iso from within grub2

Postby mir » 13 Mar 2010, 20:29

Hi,

I have tried every possible way to make this work but without luck. I always end up by seeing this error message from grub:
error: Cannot read linux header.

My grub.cfg has this setting:
menuentry "SystemRescueCD" {
insmod ext2 <---- added for test. Have no influence
insmod iso9660 <---- added for test. Have no influence
root (hd0,1) <---- added for test. Have no influence
loopback loop /boot/iso/systemrescuecd-x86-1.4.0.iso 1)
echo Loading systemrescuecd-x86-1.4.0 ...
linux (loop)/isolinux/rescue64 isoloop=/boot/iso/systemrescuecd-x86-1.4.0.iso
echo Loading initial ramdisk ...
initrd (loop)/isolinux/initram.igz
}

I have my boot folder on a separate partition so /boot/iso actually should be replaced by a simple / but just to rule out any possible errors I have created a boot/iso folder in the boot folder.

Any suggestions?

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: SystemRescueCD boot iso from within grub2

Postby admin » 14 Mar 2010, 08:51

Grub knows nothing about mount points when your system is running. So if your boot partition is mounted on /boot when your system is running, you can access that file as /boot/iso/systemrescuecd-x86-1.4.0.iso.

But when grub boots it's different. It opens your root(x,y) partition and it tries to read "/boot/iso/systemrescuecd-x86-1.4.0.iso" inside that partition. In general boot partitions have a symbolic link like that: "grub -> ." so that the extra "/boot" redirects to the same directory. But it may not be that case on your box.

So you have to check that the path (/boot/iso) really corresponds to these two directories in the partition that grub considers as the root one. Else, you should just put that file at the root of the disk to avoid problems. Also give that file a short filename, just in case.

Also make sure you don't have "rdinit" (it was for old versions only) and that you really have Grub2 (eg: Grub-1.97, Grub-1.98, ...)

Here is my current grub configuration. I have my "sysrcd.iso" file at the root of the partition (which is the root disk for grub and mount on /boot on linux):

Code: Select all

set default=0
set timeout=5
set root=(hd0,2)

menuentry "SystemRescueCd (isoloop)" {
        loopback loop /boot/sysrcd.iso
        linux (loop)/isolinux/rescuecd isoloop=sysrcd.iso setkmap=uk docache
        initrd (loop)/isolinux/initram.igz
}

mir
Posts: 10
Joined: 13 Mar 2010, 20:23

Re: SystemRescueCD boot iso from within grub2

Postby mir » 14 Mar 2010, 10:16

admin wrote:So you have to check that the path (/boot/iso) really corresponds to these two directories in the partition that grub considers as the root one. Else, you should just put that file at the root of the disk to avoid problems. Also give that file a short filename, just in case.

I am 100% sure. I even tried doing it from the grub command line using tab completion with the same error message as a result.

Doing the following works:

Code: Select all

menuentry "SystemRescueCD" {
    set      root=(hd0,1)
    echo   Loading systemrescuecd-x86-1.4.0 ...
    linux   /sysrcd/isolinux/rescue64 subdir=sysrcd setkmap=dk dostartx dodhcp dhcphostname=sysrescuecd
    echo   Loading initial ramdisk ...
    initrd   /sysrcd/isolinux/initram.igz
}

admin wrote:Also make sure you don't have "rdinit" (it was for old versions only) and that you really have Grub2 (eg: Grub-1.97, Grub-1.98, ...)

I do not use rdinit.

Code: Select all

menuentry "SystemRescueCD" {
    set      root=(hd0,1)
    loopback   loop /boot/iso/systemrescuecd-x86-1.4.0.iso
    echo   Loading systemrescuecd-x86-1.4.0 ...
    linux   (loop)/isolinux/rescue64 isoloop=/boot/iso/systemrescuecd-x86-1.4.0.iso setkmap=dk
    echo   Loading initial ramdisk ...
    initrd   (loop)/isolinux/initram.igz
}


$ dpkg -s grub-pc
Package: grub-pc
Status: install ok installed
Priority: extra
Section: admin
Installed-Size: 2224
Maintainer: GRUB Maintainers <[email protected]>
Architecture: amd64
Source: grub2
Version: 1.98-1

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: SystemRescueCD boot iso from within grub2

Postby admin » 14 Mar 2010, 11:05


admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: SystemRescueCD boot iso from within grub2

Postby admin » 14 Mar 2010, 11:07

mir wrote:Doing the following works:

Code: Select all

menuentry "SystemRescueCD" {
    set      root=(hd0,1)
    echo   Loading systemrescuecd-x86-1.4.0 ...
    linux   /sysrcd/isolinux/rescue64 subdir=sysrcd setkmap=dk dostartx dodhcp dhcphostname=sysrescuecd
    echo   Loading initial ramdisk ...
    initrd   /sysrcd/isolinux/initram.igz
}



You are just booting SystemRescueCd from normal files copied on your disk (rescue64 + initram.igz + sysrcd.dat), you are not using the ISO method at all.

I have added a specific section about isoloop. It explains how the boot process works. Having a good understanding of what happens during the boot process is the best way to fix problems.

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: SystemRescueCD boot iso from within grub2

Postby admin » 14 Mar 2010, 13:15

You can also try with systemrescuecd-x86-1.5.0-beta8.iso, the /init boot script has been rewritten, and it works for me.

mir
Posts: 10
Joined: 13 Mar 2010, 20:23

Re: SystemRescueCD boot iso from within grub2

Postby mir » 14 Mar 2010, 17:08

admin wrote:You are just booting SystemRescueCd from normal files copied on your disk (rescue64 + initram.igz + sysrcd.dat), you are not using the ISO method at all.

I know. It was just to prove to you that we are not talking of some kind of file corruption.
My best guess is that we are facing some kind of missing kernel driver or a BIOS related problem - size of image, start address of image etc.

admin wrote:I have added a specific section about isoloop. It explains how the boot process works. Having a good understanding of what happens during the boot process is the best way to fix problems.

I think I have a pretty good idea of what is going on behind the scene:-)

mir
Posts: 10
Joined: 13 Mar 2010, 20:23

Re: SystemRescueCD boot iso from within grub2

Postby mir » 14 Mar 2010, 17:37

admin wrote:You can also try with systemrescuecd-x86-1.5.0-beta8.iso, the /init boot script has been rewritten, and it works for me.

I have just tried it. No dice, same error.

admin
Site Admin
Posts: 2715
Joined: 17 Jul 2003, 09:44

Re: SystemRescueCD boot iso from within grub2

Postby admin » 14 Mar 2010, 18:08

You have to see what is the name of the boot device where the ISO file is stored. There are two possible problems:
1) It does not try to find the file on that partition
2) If tries on that partition but it does not find the file

You have to look at the messages during the boot process. It says on which devices it's trying to find each file. You can use the "Scroll lock" key to stop just after the error and have time to read, or just Ctrl+PageUp afterwards to go up in the messages.

And you should really put the ISO file in the root directory of the /boot partition (eg: not in a subdir) to be sure it's not a problem with the path.

We need to know which sort of problem it is to go further.

mir
Posts: 10
Joined: 13 Mar 2010, 20:23

Re: SystemRescueCD boot iso from within grub2

Postby mir » 14 Mar 2010, 20:11

admin wrote:You have to look at the messages during the boot process. It says on which devices it's trying to find each file. You can use the "Scroll lock" key to stop just after the error and have time to read, or just Ctrl+PageUp afterwards to go up in the messages.

The problem is that no boot is taken place. The error arises shortly after grub2 is trying to read the kernel so my guess is that grub2 is not able to find the kernel inside the ISO or for some reason refuses to read the file. If I manually hits C to enter the command line from the grub2 boot menu the steps looks something like this:

Code: Select all

grub> root (hd0,1)
grub> loopback loop /systemrescuecd-x86-1.5.0-beta8.iso
grub> linux (loop)/isolinux/rescue64 isoloop=/systemrescuecd-x86-1.5.0-beta8.iso setkmap=dk
Error: Cannot read linux header

Then follows some more text explaining me that I most load the kernel before I will be able to continue the boot process

After that no further messages are displayed. Simply put: Grub is not able to read the file containing the kernel. And yes, it is cable of finding the kernel since ls displays the file containing the kernel. Eg. ls (root)/isolinux will list all files as should be found in this folder.
admin wrote:And you should really put the ISO file in the root directory of the /boot partition (eg: not in a subdir) to be sure it's not a problem with the path.

Yes, the actual lines from grub.cfg looks like this:

Code: Select all

menuentry "SystemRescueCD (isoloop)" {
    set      root=(hd0,1)
    loopback   loop /systemrescuecd-x86-1.5.0-beta8.iso
    echo   Loading systemrescuecd-x86-1.5.0-beta8 ...
    linux   (loop)/isolinux/rescue64 isoloop=/systemrescuecd-x86-1.5.0-beta8.iso setkmap=dk
    echo   Loading initial ramdisk ...
    initrd   (loop)/isolinux/initram.igz
}


Return to “Boot problems”

Who is online

Users browsing this forum: No registered users and 2 guests