2

I'm trying to get slitaz 4.0 ISO to boot using a grub2 loopback on a multiboot USB;

insmod font
if loadfont /boot/grub/unicode.pf2 ; then
    insmod gfxterm
#   insmod efi_gop
#   insmod efi_uga
    insmod vbe
    insmod vga
    set gfxmode=auto
    set gfxpayload=auto
    terminal_output gfxterm 
    if terminal_output gfxterm; then true ; else
        terminal gfxterm
    fi
fi

set color_normal=white/black
set color_highlight=white/light-blue

set drive_uuid=DA64-F023
set isopath=/iso

menuentry "Slitaz 4.0" {
    set isofile="$isopath/slitaz-4.0.iso"
    loopback loop $isofile
    linux (loop)/boot/bzImage rw root=/dev/null vga=normal autologin isofrom=$isofile noeject noprompt lang=en kmap=en
    initrd (loop)/boot/rootfs4.gz (loop)/boot/rootfs3.gz (loop)/boot/rootfs2.gz (loop)/boot/rootfs1.gz
} # screen=text home=usb (need ext3 partition)

It does reach a terminal prompt however is unable to startx due to missing files - I would believe because the multiple initrd images haven't been loaded.

Does anyone know if grub2 supports loading multiple initrd images, and if so what syntax is used?

Thermionix
  • 566
  • 6
  • 15
  • Not sure if grub2 supports it but if it does you would probably have to specify for each file an extra initrd line - see also http://www.gnu.org/software/grub/manual/grub.html#initrd – Ulrich Dangel May 25 '12 at 03:48
  • trying it with one per line gives a Kernel panic - not syncing: VFS: Unable to mount root fs – Thermionix May 25 '12 at 04:27
  • As of December 2018, I can use grub2 to boot SliTaz (with all 4 rootfsN.gz files) using the config provided by Thermionix in the original question. Therefore, I speculate that the bugs referenced in Derek's answer have been fixed. – mpb Dec 05 '18 at 23:18

2 Answers2

1

If you're far enough along to reach a terminal prompt that's more than far enough to concatenate as many images as you could desire. All you need to do from there is:

zcat <init.image | { cd / ; cpio -i \
  --make-directories \ 
#                        #Create leading directories where needed
  --preserve-modification-time \
#                        #Retain previous file modification times when
#                        #creating files
  --sparse \            
#                        #Write files with large blocks of zeros as sparse
#                        #files
  --unconditional    ; } 
#                        #Replace all files unconditionally 
mikeserv
  • 57,448
  • 9
  • 113
  • 229
0

It doesn't (yet) work. Ref: http://www.sysresccd.org/forums/viewtopic.php?f=14&t=4368 But is being worked on http://savannah.gnu.org/bugs/?35238

You can though still boot "base".


menuentry "OK: SliTaz base" {
 set isofile="/slitaz-4.0.iso"
 loopback loop $isofile
 linux (loop)/boot/bzImage  initrd=/boot/rootfs4.gz lang=C kmap=uk rw root=/dev/null vga=normal autologin
 initrd (loop)/boot/rootfs4.gz
}
Derek
  • 1
  • As of December 2018, I can use grub2 to boot SliTaz (with all 4 rootfsN.gz files) using the config provided by Thermionix in the original question. Therefore, I speculate that the bugs referenced in Derek's answer have been fixed. – mpb Dec 05 '18 at 23:18