[Request for testing] ISO to detect and boot (almost) any operating system.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
[Request for testing] ISO to detect and boot (almost) any operating system.
Hello,
Next Slint ISO will rely on GRUB 2.04 for:
booting the installer
and also the USB boot disk to be used in case of booting issue of the installed system from the hard disk or SSD, in both Legacy and EFI modes.
Good bye isolinux, lilo and elilo for that!
In both cases the GRUB boot menu will include an entry allowing to detect and boot (almost) any installed OS, as already do Slackware's and Slint's USB boot disk, but with enhancements, allowed by using GRUB 2.04 in both Legacy and EFI modes, and benefiting of the features of the last Super Grub Disk.
This menu entry should detect and boot FreeDOS, MS-DOS, FreeBSD, Windows, Linux and MacOS in various contexts, including:
_ legacy and EFI modes on i386 and x86_64 architectures,
_ partition tables acorn, amiga, apple, bsd, gpt, msdos, sun, sunpc,
_ LVM, RAID, LUKS and geli encrypted volumes,
_ serial terminals with these settings: port 0 aka com0, speed 9600 bauds, 8 data bits, one stop bit, parity none.
Please test as much of these abilities as possible.
Nice!
It works on my laptop, Dell Inspiron 1545, but I only have linux systems, all just regular partitions, etx4, no Windows, etc
I only have slackware 14.2 and current, and Debian Bullseye/sid installs
Then i put the stick into my BIOS-only test PC of 2010:
Code:
CPU: AMD Athlon II X4 620 Quad-Core
Mainboard: GIGABYTE GA-MA74GM-S2H AM2 GLAN RAID.
Award BIOS v6.00 PC
It boots to a GRUB menu with two options. I choose the second one
(after Didier told me to do so).
The machine has, matching its age, old Debian 5 (ext3), FreeBSD 8 (UFS),
and OpenSolaris 134 (ZFS).
The detection result is mediocre and the boot result even worse.
First messages after choosing the boot menu option is
Code:
error: procfs does not support UUIDs.
and then four times
Code:
error: unknown filesystem
Then appears a long GRUB menu where navigation is quite slow, scrolling is
very slow, and impatiently entered arrow-key presses during waiting time
for movement get discarded.
There are five Linux kernels, each offered with and without "(single)":
vmlinuz-2.6.32-5-amd64, vmlinuz-xen, vmlinuz-2.6.27.7-9-xen,
vmlinuz-2.6.27.7-9-default, vmlinuz-2.6.26-2-amd64.
I did not test the "-xen".
"-default" causes fast scrolling console text. I believe to see it reports
"free magic is broken at ...hex.number...". Finally it reboots to BIOS.
The two "-amd64" immediately reboot into BIOS.
So none of the Linux offers works.
FreeBSD gets listed as ten menu entries with any combination of
{(hd1,msdos1,bsd1),(hd1,msdos1)} x
{normal,single,verbose,safe mode,Default bootloader}
(hd1,msdos1,bsd1) boots with "normal" and "Default bootloader".
(hd1,msdos1) boots with "normal" but runs into some bootloader command
mode with "Default bootloader".
"Default bootloader" offers me several BSD boot modes. It is the boot path
which the GRUB on the hard disk takes if i choose FreeBSD in its menu.
"normal" boots directly into FreeBSD kernel startup. Some messages in
the beginning look unfamiliar. But i get a login prompt.
I will try to insmod more GRUB file system modules, including procfs and see what happens.
Quote:
So none of the Linux offers works.
Are you sure all kernels have an associated initrd? If not setting root=UUID=<fs-uuid> can't work. But if not you'd get a kernel panic, not a reboot so that can't be the reason, I think.
It would be interesting to know if you get better results using super_grub2_disk_hybrid_2.04rc1s1-beta4.iso (also for testing the Solaris boot entries).
Quote:
Solaris is not offered at all. (Due to ZFS ?)
I don't know. However, the zfs module is inserted by /boot/grub/grub.cfg
@All: Thomas also helped me to get test.iso boot on my laptop also in BIOS aka Legacy mode, modifying the xorriso command built by grub-mkrescue to overcome what seems to be a firmware limitation or bug. I will upload an updated ISO. Thanks Thomas!
Best,
EDIT: following new suggestions from Thomas I will try new options tomorrow, before uploading a new version.
Last edited by Didier Spaier; 07-19-2019 at 04:07 PM.
Reason: EDIT added
see the grub.cfg of the test machine. It is hosted by the Debian 5 installation as
/boot/grub/grub.cfg and can boot all three operating systems on the machine.
Regrettably the forum software does not allow me to attach it. (Because .cfg ?)
So inline:
Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set e3378181-54dc-4fe3-97e2-d7f2b6c1d296
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set e3378181-54dc-4fe3-97e2-d7f2b6c1d296
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set e3378181-54dc-4fe3-97e2-d7f2b6c1d296
insmod png
if background_image /usr/share/images/desktop-base/spacefun-grub.png; then
set color_normal=light-gray/black
set color_highlight=white/black
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set e3378181-54dc-4fe3-97e2-d7f2b6c1d296
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=e3378181-54dc-4fe3-97e2-d7f2b6c1d296 ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
insmod part_msdos
insmod ext2
set root='(hd0,msdos8)'
search --no-floppy --fs-uuid --set e3378181-54dc-4fe3-97e2-d7f2b6c1d296
echo 'Loading Linux 2.6.32-5-amd64 ...'
linux /boot/vmlinuz-2.6.32-5-amd64 root=UUID=e3378181-54dc-4fe3-97e2-d7f2b6c1d296 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-5-amd64
}
menuentry "FreeBSD-8.0 STABLE on Partition 1" {
insmod part_bsd
insmod part_msdos
insmod ufs2
set root='(hd0,1,1)'
kfreebsd /boot/loader
}
menuentry "Solaris snv 134 on Partition 3" {
set root=(hd0,3)
chainloader +1
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Debian GNU/Linux, linux 2.6.26-2-amd64, eSATA 1.5Gbps (on /dev/sda5)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 5badec4b-751e-47e1-a3c5-f8555d680cc4
linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=5badec4b-751e-47e1-a3c5-f8555d680cc4 ro
initrd /boot/initrd.img-ts
}
menuentry "Debian GNU/Linux, linux 2.6.26-2-amd64 (on /dev/sda5)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 5badec4b-751e-47e1-a3c5-f8555d680cc4
linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=5badec4b-751e-47e1-a3c5-f8555d680cc4 ro
initrd /boot/initrd.img-2.6.26-2-amd64
}
menuentry "Debian GNU/Linux, linux 2.6.26-2-amd64 (single-user mode) (on /dev/sda5)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set 5badec4b-751e-47e1-a3c5-f8555d680cc4
linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=5badec4b-751e-47e1-a3c5-f8555d680cc4 ro single
initrd /boot/initrd.img-2.6.26-2-amd64
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
i tried super_grub2_disk_hybrid_2.04rc1s1-beta4.iso .
The result is about the same as with test.iso in my previous experiment.
FreeBSD boots, Linux is offered but fails, Solaris is missing in the
self detected list. All in all this list is the same as with test.iso.
Other than test.iso it also added items from grub.cfg on hard disk.
Interestingly, the normal Linux item from this list fails exactly the same
way as the self detected item.
First self-detected menu item which immediately reboots:
Code:
menuentry 'Linux /boot/vmlinuz-2.6.32-5-amd64 (hd1,msdos8)' 'hd1,msdos8' 'e3378181-54dc-4fe3-97e2-d7f2b6c1d296' 'boot/vmlinuz-2.6.32-5-amd64' {
set root="$2"
set uuid="$3"
set kernel "$4"
set version="$5"
linux $kernel root=UUID=$uuid ro
if test -f /boot/initrd_$version.img; then
initrd /boot/initrd-$version.img
elif test -f /boot/initrd.img-$version; then
initrd /boot/initrd.img-$version
elif test -f /boot/initrd-$version; then
initrd /boot/initrd-$version
elif test -f /boot/initramfs-genkernel-$version; then
initrd /boot/initramfs-genkernel-$version
elif test -f /boot/initramfs-$version.img; then
initrd /boot/initramfs-$version.img
fi
}
(Hand copied to paper and then in another room to computer. Expect some
funny typos here.)
Obvious deviations from the working menu item on hard disk:
- No --class debian --class gnu-linux --class gnu --class os
among menuentry arguments.
- Hard disk is called hd1, rather than hd0 as on hard disk.
- No "search --no-floppy --fs-uuid --set e3378181-54dc-4fe3-97e2-d7f2b6c1d296"
I tried to use hd0 instead of hd1. Result:
Code:
Booting a command list
error: no such partition
Press any key to continue
Not being an experienced GRUB wizzard, i run out of ideas what's wrong
and how to correct it.
Have a nice day
Thomas
Last edited by scdbackup; 07-20-2019 at 08:11 AM.
Reason: Added forgotten "; then" in hand-copied part
I dd test2.iso to usb, found and booted my windows, slackware,debian,arch,fedora in both efi and legacy mode without any problems. In legacy mode it shows the efi partition boot entries but says have to be efi mode to boot or something like that. In the process of installing freebsd, and will give lvm and luks a try when I get a chance to set up them up.
edit: Freebsd worked on both legacy and efi mode.
In efi mode the non-efi freebsd entries did not work. These entries was the ones that worked in legacy mode.
Last edited by colorpurple21859; 07-20-2019 at 10:17 AM.
Regrettably the forum software does not allow me to attach it. (Because .cfg ?)
The forum software only accepts files whose name ends in .txt.
Quote:
Originally Posted by scdbackup
i tried super_grub2_disk_hybrid_2.04rc1s1-beta4.iso .
...
All in all this list is the same as with test.iso.
At least I didn't add downstream bugs to the upstream ones then
Quote:
Other than test.iso it also added items from grub.cfg on hard disk.
Interestingly, the normal Linux item from this list fails exactly the same
way as the self detected item.
First self-detected menu item which immediately reboots:
Code:
menuentry 'Linux /boot/vmlinuz-2.6.32-5-amd64 (hd1,msdos8)' 'hd1,msdos8' 'e3378181-54dc-4fe3-97e2-d7f2b6c1d296' 'boot/vmlinuz-2.6.32-5-amd64' {
set root="$2"
set uuid="$3"
set kernel "$4"
set version="$5"
linux $kernel root=UUID=$uuid ro
if test -f /boot/initrd_$version.img; then
initrd /boot/initrd-$version.img
elif test -f /boot/initrd.img-$version; then
initrd /boot/initrd.img-$version
elif test -f /boot/initrd-$version; then
initrd /boot/initrd-$version
elif test -f /boot/initramfs-genkernel-$version; then
initrd /boot/initramfs-genkernel-$version
elif test -f /boot/initramfs-$version.img; then
initrd /boot/initramfs-$version.img
fi
}
...
Obvious deviations from the working menu item on hard disk:
- No --class debian --class gnu-linux --class gnu --class os
among menuentry arguments.
- Hard disk is called hd1, rather than hd0 as on hard disk.
- No "search --no-floppy --fs-uuid --set e3378181-54dc-4fe3-97e2-d7f2b6c1d296"
I tried to use hd0 instead of hd1. Result:
Code:
Booting a command list
error: no such partition
Press any key to continue
Not being an experienced GRUB wizzard, i run out of ideas what's wrong
and how to correct it.
At least you are a booting wizard and the xorriso wizard
I don't have real clues, some remarks:
--class debian --class gnu-linux --class gnu --class os shouldn't matter I think that's just to group menu entries into classes and possibly display similarly menu entries belonging to the same class, so purely cosmetic if I understand well
search --no-floppy --fs-uuid --set <fs-uuid value> sets the value of the root variable. But I fail to see why it would be needed by old Linux kernels and not by new ones (actually the initrd should translate this value to a partition name like /dev/<name> running udev or mdev)
It wouldn't hurt to try editing the menu entry "Linux /boot/vmlinuz-2.6.32-5-amd64 (hd1,msdos8)" to insert this line found in grub.cfg before booting though:
search --no-floppy --fs-uuid --set e3378181-54dc-4fe3-97e2-d7f2b6c1d296
Then write it just before the line beginning with linux and press F10.
Last, my grub-mkrescue commands compress the grub modules with this option: --compress=xz
Maybe try to replace it with --compress=no
Else, maybe we could post the issue on the grub-devel ML or make aware of it Adrian Gibanel Lopez, author of Super Grub Disk.
I dd test2.iso to usb, found and booted my windows, slackware,debian,arch,fedora in both efi and legacy mode without any problems. In legacy mode it shows the efi partition boot entries but says have to be efi mode to boot or something like that. In the process of installing freebsd, and will give lvm and luks a try when I get a chance to set up them up.
edit: Freebsd worked on both legacy and efi mode.
In efi mode the non-efi freebsd entries did not work. These entries was the ones that worked in legacy mode.
Thanks for testing. Give lvm and luks a try would be interesting indeed.
One of the benefits of the new ISO is that when copied to an USB stick this results in a dos partition table with two partitions, to which you can add other partitions with fdisk or cfdisk to store anything you want:
Code:
Disque /dev/sdc : 123,5 MiB, 129499136 octets, 252928 secteurs
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x00000000
Périphérique Amorçage Début Fin Secteurs Taille Id Type
/dev/sdc1 * 64 10371 10308 5M 83 Linux
/dev/sdc2 10372 16131 5760 2,8M ef EFI (FAT-12/16/32)
Last edited by Didier Spaier; 07-21-2019 at 06:02 AM.
Reason: Typo fix
in general i am confident that the MBR/DOS partition table will cause not
more boot time trouble than GPT does. Actually GPT is exotic in the world
of GNU/Linux installation ISOs.
But just in case that some EFI does not recognize the EFI partition of
test8.iso on USB stick, i tried what happens if i let gdisk convert to GPT.
Testers of real-iron EFI could add a second round of USB stick boot
testing after having let gdisk convert to GPT. Just as preparation for
any future victims whose EFI really needs it.
I have no picky EFI system for testing bootability in genuine EFI mode.
So i could only check the quality as filesystem partitions. Here is the
shell session log (some commands may need superuser authority):
Code:
$ dd if=test8.iso bs=1M of=/dev/sdc
7+1 records in
7+1 records out
8259584 bytes (8.3 MB) copied, 2.80313 s, 2.9 MB/s
$ /sbin/gdisk /dev/sdc
...
Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present
***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by
typing 'q' if you don't want to convert your MBR partitions
to GPT format!
***************************************************************
Command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdc.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
$
$ # ----- Now for inspection of the result -----
$
$ /sbin/gdisk /dev/sdc
...
MBR: protective
BSD: not present
APM: not present
GPT: present
...
Command (? for help): p
...
Disk identifier (GUID): 8FDA0704-A0F7-48DE-A9E7-7DEE9F1B7396
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3915742
Partitions will be aligned on 4-sector boundaries
Total free space is 3899641 sectors (1.9 GiB)
Number Start (sector) End (sector) Size Code Name
1 64 10371 5.0 MiB 8300 Linux filesystem
2 10372 16131 2.8 MiB EF00 EFI System
...
$ /sbin/hdparm -z /dev/sdc
/dev/sdc:
re-reading partition table
$ mount /dev/sdc /mnt/iso
mount: /dev/sdc is write-protected, mounting read-only
$ tar cf - /mnt/iso | wc
tar: Removing leading `/' from member names
17351 93909 4597760
$ umount /mnt/iso
$ mount /dev/sdc1 /mnt/iso
mount: /dev/sdc1 is write-protected, mounting read-only
$ tar cf - /mnt/iso | wc
tar: Removing leading `/' from member names
17351 93909 4597760
$ mount /dev/sdc2 /mnt/fat
$ tar cf - /mnt/fat | wc
tar: Removing leading `/' from member names
679 7496 512000
$
If gdisk would not warn so loudly, this all would look very harmless.
Even the backup GPT is now sitting where it belongs without any need
for partition editor expert operations.
Original and GPT-ized test8.iso boot fine from USB stick with my elderly
BIOS-only machine.
The up-down navigation in the GRUB menu of detected boot offers is still
much slower than with super_grub2_disk*iso. But it seems that impatiently
pressed keys get not discarded any more. (Now impatience gets punished by
slow overshooting ...)
No it doesn't pick up a system that has a separate boot partition. Tried it with linux mint installed on partition /dev/sda14 and /boot on /dev/sda10 partition. Contents of the boot partition is your standard boot stuff
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda14 during installation
UUID=d7571194-65d0-471f-8850-d8b19ce85558 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda10 during installation
UUID=2c258071-2f54-49c0-8d47-e5618effcf6a /boot ext4 defaults 0 2
# swap was on /dev/sda4 during installation
UUID=64d02e0a-ace4-458d-9f91-8df5c611ab07 none swap sw
Last edited by colorpurple21859; 07-21-2019 at 04:23 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.