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.
infinity
Posts: 1
Joined: 20 Oct 2009, 22:42

SystemRescueCD boot iso from within grub2

Postby infinity » 20 Oct 2009, 22:56

Hi,

I am using an USB stick with grub2 to boot linux distributions from their iso files directly. Unfortunately I am not able to get the iso of SystemRescueCD working. The error message I got is

Code: Select all

!! Media not found
No bootable medium found. Waiting for new devices...

And then I am in the busybox shell.

With the help of a menuentry from this website http://stealinurmegahurtz.com/grub2-iso-boot-options/ I was able to boot into my existing linux on my hard disk using SystemRescueCD. It's a beginning, but I would like to boot directly into SystemRescueCD.... Here is the mentioned menuentry:

Code: Select all

menuentry "SystemRescueCD x86, existing partition" {
 loopback loop /boot/iso/systemrescuecd-x86-1.3.1.iso
 linux (loop)/isolinux/rescuecd root=auto init=/linuxrc looptype=squashfs loop=(loop)/sysrc.dat
 initrd (loop)/isolinux/initram.igz
}


Does anybody know how to configure the menuentry correctly?

Many thanks in advance!

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

Re: SystemRescueCD boot iso from within grub2

Postby admin » 24 Oct 2009, 15:52

Many of these boot options are very old and useless. If you just use the same boot options as the official syslinux.cfg it should work.
The important thing is that the paths to "rescuecd" and "initram.igz" are correct but I guess it is if you are at that stage.

Once in the mimishell, what are the devices available ?
# cat /proc/partitions
# dmesg

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

Re: SystemRescueCD boot iso from within grub2

Postby Janneggers » 28 Oct 2009, 08:54

Hi,

I'm trying to do the same thing, and i'm having the same problems.

admin: could you please clarify which kernel options are obsolete, the syslinux.cfg file for 1.3.0 has no options at all for rescuecd or rescue64 and infinity's paths to rescuecd and initram.igz are correct.

Please realize that when people make multi-live-cd usb sticks, that systemrescuecd should be on there! And to my opinion the new Grub2 loopback method is the easiest way to maintain these kinds of sticks.


P.S. i would also like to mention this website:
http://www.panticz.de/MultiBootUSB

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

Re: SystemRescueCD boot iso from within grub2

Postby admin » 31 Oct 2009, 21:01

The following boot options are now useless:

Code: Select all

init=/linuxrc looptype=squashfs loop=(loop)/sysrc.dat

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

Re: SystemRescueCD boot iso from within grub2

Postby Janneggers » 04 Nov 2009, 10:28

thanks admin, it solved the error infinity posted but something weird happened, first my grub config:

Code: Select all

menuentry "SystemRescueCD {
 loopback loop /boot/iso/systemrescuecd-x86-1.3.0.iso
 linux (loop)/isolinux/rescuecd root=auto
 initrd (loop)/isolinux/initram.igz


The weird thing that happened was that:
- the SystemRescueCD booted into, i saw all the kernel info coming by
- It asked me for the keymap, chose default
- It scanned my drives/partitions
- X started and I ended up with my UBUNTU desktop (from sda1)

Why is SystemRescueCD booting into ubuntu?

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

Re: SystemRescueCD boot iso from within grub2

Postby Janneggers » 04 Nov 2009, 16:12

looking at http://www.sysresccd.org/Sysresccd-manual-en_Booting_the_CD-ROM#General_boot_options i figured out that it was the root=auto option that made SystemRescueCD boot my Ubuntu.

So I removed the option and now I'm back at the busybox console error that infinity posted.
if I do a cat /proc/partitions i get: sda, sda1, sda2, sda3, sda4, sdb, sdb1. Which match with the four partitions of the drive in my laptop and the one partition on the USB drive.

In the dmesg I can see it tries to mount sdb1 as ext4 but it is in fact fat32, maybe that is the problem.

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

Re: SystemRescueCD boot iso from within grub2

Postby admin » 04 Nov 2009, 20:20

During the boot process (init script in the initram.igz) SystemRescueCd is looking
for a partition that contains sysrcd.dat. In that case there is no partition that contains that file.
There is just an iso image and SystemRescueCd does not mount iso images.

It's possible to do that with modification. If you are interested in this you can hack the init script so that it mounts the iso image. You can read the chapter about how to customize sysresccd, it tells you how to modify the initram.igz file.

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

Re: SystemRescueCD boot iso from within grub2

Postby Janneggers » 05 Nov 2009, 08:45

From reading http://www.sysresccd.org/Sysresccd-manual-en_Build_a_SystemRescueCd_with_your_own_kernel#Recreate_the_initramfs i've learned that the initram.igz is a container that holds the kernel modules. There is no mention about the init script. Anyway I think hacking the init script is a bit out of my league. For the moment i'll just extract the image, i just like the idea, that when a new version appears i can just interchange the iso and modify a line in the grub.cfg and done.

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

Re: SystemRescueCD boot iso from within grub2

Postby admin » 06 Nov 2009, 20:38

Yes this modification may be added in a future version (maybe 1.4.0)

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

Re: SystemRescueCD boot iso from within grub2

Postby admin » 07 Nov 2009, 22:30

I have prepared an alternative linuxrc2 init script that can be used a a replacement of the init script which is currently in initramfs.igz.
http://beta.sysresccd.org/linuxrc2

You can customize the current SystemRescueCd and add this linuxrc2 to initramfs.igz

And then boot the iso image this way:

Code: Select all

menuentry "SystemRescueCd iso image" {
    set root=(hd0,1)
    loopback loop (hd0,1)/boot/systemrescuecd.iso
    linux (loop)/isolinux/rescuecd setkmap=us isoloop=/boot/systemrescuecd.iso rdinit=/linuxrc2
    initrd (loop)/isolinux/initram.igz
}


This file will be part of SystemRescueCd-1.3.3-beta1. It's not yet the default because the modification could break other things. You have to replace (hd0,1) with the name of the partition where the iso file is stored, and isoloop must be the path to the iso file in that partition.

Feedback is welcome as well as other tests based on that file (pxeboot, normal boot from hard disk, ...)

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

Re: SystemRescueCD boot iso from within grub2

Postby Janneggers » 09 Nov 2009, 12:41

Thank you admin,
I will definitely try the new init script, but i'm in the middle of graduating, so please give me some time.

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

Re: SystemRescueCD boot iso from within grub2

Postby admin » 21 Nov 2009, 21:44

Yes, thanks for testing that, anyway it will probably not be before release 1.4.0

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

Re: SystemRescueCD boot iso from within grub2

Postby Janneggers » 25 Nov 2009, 13:35

I've tested the new linuxrc2 init script,

first a few comments about customizing sysresccd:
  • I first tried customizing from ubuntu, but no succes because you really need the sysresccd-custom script
  • So i installed the sysresccd on a usbstick using the usb-install manual
  • Then i found out that the sysresccd-custom script needs the isolinux directory which the usb-install told me to delete
  • So i had to reboot back into ubuntu to put the isolinux dir back on the usb-stick
  • I think the usb-install manual needs a side-note about customizing and isolinux or the custom script need to be expanded to look for the syslinux dir instead.

Back to topic:
I've created the custom rescue cd with the new initram.igz, but the only message i get is: Decompressing linux where after my system reboots. So i think i made a booboo customizing the rescuecd, has anybody seen this behavior before?

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

Re: SystemRescueCD boot iso from within grub2

Postby admin » 12 Dec 2009, 17:45

Now the script is in the official initram.igz so you don't have to make your customized initramfs.
you just have to specify rdinit=/linuxrc2 so that it uses this beta script instead of the default one.

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

Re: SystemRescueCD boot iso from within grub2

Postby Janneggers » 17 Dec 2009, 15:55

I've tested it on 1.3.3 and it works, thanks,

for completeness, here is the relevant part of my grub.cfg

Code: Select all

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


One thing though:
while shutting down some warnings were showed about failing the unmount /mnt/cdrom.


Return to “Boot problems”

Who is online

Users browsing this forum: Google [Bot] and 5 guests