clearlinux / clr-installer

Clear Linux* OS Installer
GNU General Public License v3.0
92 stars 42 forks source link

Failed to find installer media when booting the iso file. #669

Closed EdPhere closed 4 years ago

EdPhere commented 4 years ago

I'm getting the Failed to find installer media when booting the iso which was downloaded from here. I've tried every bootparm I know of to get it to recognize the iso.

Grub2Win menu menuentry " Clear Linux* OS" --class other --class icon-gnugrub {

 set lang="en" 
 set iso="/Users/Ed/Downloads/clear-32270-live-desktop.iso"

https://github.com/clearlinux/distribution/issues/1072

 set bootparms="from=all, from=$iso, fromiso=$iso, findiso=$iso, iso-scan/filename=$iso, bootfrom=/dev/sda6$iso quiet console=tty0 console=ttyS0,115200n8 cryptomgr.notests init=/usr/bin/initra-desktop initcall_debug intel_iommu=igfx_off kvm-intel.nested=1 no_timer_check noreplace-smp page_alloc.shuffle=1 rcu_nocbs=0-64 rcupdate.rcu_expedited=1 tsc=reliable rw rootwait" # rootfstype=ext4,btrfs,xfs " 

 set bootdrv=$root
 search -f $iso --set=root 
 if [ $? = 0 ] ; then
    loopback loop $iso
    linux  (loop)/kernel/kernel.xz $bootparms
    initrd (loop)/EFI/BOOT/initrd.gz 
    loopback --delete loop
 else
    echo "----------------------------------------"
    echo ISO NOT found. root=$root bootdrv=$bootdrv
    echo $iso
    echo
    sleep -v -i 10
 fi
 set root=$bootdrv
 }  

System is a Dell EFI notebook, 4GB RAM, Windows 10, and Grub2Win for multi-booting of which I do many iso files. Before Grub2Win I booted iso files using Grub4DOS.

mdhorn commented 4 years ago

I'd guess because you do not have 'rootfstype=ext4,btrfs,xfs' set. I don't know win2grub, but that looks like it is a comment.

EdPhere commented 4 years ago

Ok, I will try that but I don't think the iso is any of those formats, nor the drive it's on.

Grub2Win is a Windows app for installing grub2 and creating menus for it. So the menu you see is a standard grub2 menu, manually made for this iso.

-update-

Adding the rootfstype parm didn't help. Rebooted, same problem.

lebensterben commented 4 years ago

Ok, I will try that but I don't think the iso is any of those formats, nor the drive it's on. ...

@EdPhere Would you try making the installer media with Etcher? https://docs.01.org/clearlinux/latest/get-started/bootable-usb.html#bootable-usb

EdPhere commented 4 years ago

I shouldn't need to use another app to create a bootable device to boot the iso.

These are some of the other isos I boot directly using grub2.

 set iso='/ISOs/linuxmint-19.2-cinnamon-64bit.iso'
 set iso='/ISOs/install64.iso'
 set iso=/ISOs/OV.Porteus-OPENBOX-v5.0rc1-zstd-x86_64.iso
 set iso=/ISOs/Porteus-LXQT-v3.1-x86_64-nu-r.iso
 set iso=/ISOs/Porteus-CINNAMON-v3.2.2-x86_64.iso
 set iso='/ISOs/slackware64-live-xfce-current.iso'
 set iso=/ISOs/porteus-nemesis-v3.5-lxde-x86_64.iso
 set iso='/ISOs/antiX-16.1_x64-full.iso'
 set iso=/ISOs/Parrot-lite-3.6_amd64.iso
 set iso='/ISOs/ubuntu-18.04.1-desktop-amd64.iso'
 set isopath="/ISOs/R-DriveImage_6.1.6107_OEMKit.iso"
 set iso="/ISOs/runtimelivecd.iso"
 set iso="/ISOs/Parted_Magic_2019_09_03.iso"
lebensterben commented 4 years ago

I shouldn't need to use another app to create a bootable device to boot the iso. ...

@EdPhere maybe you shouldn't, but grub2win just doesn't work....

EdPhere commented 4 years ago

Thanks lebensterben but grub2 works fine for many isos. I just need the bootparm for Clear to boot the Clear iso.

EdPhere commented 4 years ago

I tried adding the iso9660 format to the rootfstype parm but that didn't help.

The need to write isos to usb drives to be able to boot them has kinda dried up over the past 5 or more years as people couldn't afford the bigger and bigger drives needed to hold them. And the thought of having to buy a usb drive just to test a new system to see if you even like it seems illogical also. I think iso booting is what has caused the price of usb drives to drop.

I've heard some good things about Clear Linux and kinda wanted to see it.

EdPhere commented 4 years ago

So initrd's init has:

# Finds the installer media and calls mount_root if successful
find_and_mount_installer() {
    local retries=0

    while [ $retries -le 5 ]; do
        local installer=$(blkid -L CLR_ISO)
        if [ -n "${installer}" ]; then
            echo_tty_kmsg "[${SUCCESS}  OK  ${NORMAL}] Found installer media, continuing boot..."
            mount_root ${installer}
            break
        else
            echo_tty_kmsg "Searching for installer media, retrying..."
            sleep 1
            (( retries++ ))
        fi
    done

    if [ $retries -ge 5 ]; then
        shell_trap "[${FAILURE} FAIL ${NORMAL}] Failed to find installer media, retries exhausted, failed to boot Clear Linux*."
    fi
}

Now the question is where is the blkid found and is there a parm to specify it.

lebensterben commented 4 years ago

I tried adding the iso9660 format to the rootfstype parm but that didn't help. ...

@EdPhere Clearlinux doesn't use GRUB. I've never heard of Grub2Win and if it uses GRUB to load Linux live ISOs, you have to find a way to chain-boot GRUB and systemd-boot.

If you cannot accept the easy way of using Etcher to burn a installer media, you are on your own in this situation....

EdPhere commented 4 years ago

The blkid should be "/dev/loop0" which is not null so...???

Is Clear Linux tied to a usb manufacturer like SanDisk. The push to make people to use a usb drive is getting kinda suspicious. lol

EdPhere commented 4 years ago

Maybe an IT tech or developer will stop by and help. It could simply be a problem with the mkisofs parms used to create the iso.

BTW Grub2Win does support booting Clear Linux when it's installed. If you do a Google search on grub2 you will learn what it's about and how it helps boot multiple systems which a lot of us techs like to do.

mdhorn commented 4 years ago

The ISO we make is hybrid so it can boot in legacy mode and UEFI. You can read about it here: https://github.com/clearlinux/clr-installer/blob/master/isoutils/ISO_README.md

We boot this all the time from the ISO file in virtual environments, so there is no requirement for a physical USB device.

From your environment, can you run sudo blkid? The boot process is looking for the label CLR_ISO, we we add in the creation process, to know what to boot.

EdPhere commented 4 years ago

Wow!! Great link mdhorn. I was in the process of creating a script to rebuild the iso so adding the script mentioned in your link should work.

#!/bin/sh

if [ `whoami` != "root" ]; then
   echo -e "Enter root's password"
   su -c "sh $0 $1"
   exit
fi

#set -x;

DOWNLOAD=/mnt/sda6/Ed/Downloads
ISO=clear-32270-live-desktop.iso

# rerun
[[ -d  "/tmp/NEW/" ]]  && rm -rf /tmp/NEW;

echo Building NEW iso
cd /$DOWNLOAD

ls $ISO
echo 
#
mkdir mnt
mount -t iso9660 -o loop $DOWNLOAD/$ISO mnt  
mkdir NEW
cp -a mnt/* NEW/.
cp -a /mnt/.[0-9A-Za-z]* NEW/. 2>/dev/null
umount -f mnt
rm -fr mnt
#
echo
echo "Check the /NEW folder?"
read
echo
#
mkisofs -o NEW.iso -v -l -J -joliet-long  -R -D -A CLR_ISO -V CLR_ISO \
 -no-emul-boot -boot-info-table -boot-load-size 4 \
 -b boot/syslinux/isolinux.bin -c boot/syslinux/isolinux.boot NEW
rm -fr NEW 
echo
mv NEW.iso NEW$ISO.iso                                           
ls *$ISO
#
read

But a bootparm option would be so much easier. lol

As for the blkid you asked for:

guest@porteus:~$ su
Password: 
root@porteus:/home/guest# blkid
/dev/sda1: LABEL="ESP" UUID="EC3C-F23D" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="7fd40e46-5f42-4923-b34b-e66e29d09dd6"
/dev/sda3: LABEL="OS" UUID="6A4AB3B24AB37D9D" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6e99c5d4-6d33-4306-9e92-41c955db22e5"
/dev/sda4: UUID="E1426F58426F33A5" TYPE="ntfs" PARTUUID="167bbb67-2d14-446c-8170-109317713137"
/dev/sda5: LABEL="Image" UUID="0110ED9410ED90C8" TYPE="ntfs" PARTUUID="289fe958-4a03-48bd-887b-1ca1704c71a8"
/dev/sda6: LABEL="Data" UUID="6228E9A628E974E9" TYPE="ntfs" PARTLABEL="User data partition" PARTUUID="8b565361-5662-4053-8645-a42ab953fef1"
/dev/sda7: LABEL="Backups" UUID="8FACEAFCACEAB472" TYPE="ntfs" PARTLABEL="User backup partition" PARTUUID="02baf0b4-526a-48b1-9792-cd799269ee94"
/dev/sda8: LABEL="Backup10.1" UUID="8E42EC8742EC5C36" TYPE="ntfs" PARTLABEL="User backup partition" PARTUUID="5ab52fc7-1dea-4dcf-a2ab-63e81bb67877"
/dev/loop0: UUID="2018-04-29-08-14-00-04" LABEL="Porteus" TYPE="iso9660"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
 :
 :
/dev/loop20: TYPE="squashfs"
/dev/loop21: TYPE="squashfs"
/dev/sda2: PARTLABEL="Microsoft reserved partition" PARTUUID="e2cedc80-c80c-46e8-b2ec-a269ea3ec3f0"
root@porteus:/home/guest# 

As you can see no CLR_ISO ids. And yes my machine is an EFI machine and none of the isos I boot reside on the EFI partition. They are all on the Data partition.

I will let you know how I make out.

Thank you again.

EdPhere commented 4 years ago

I give up. I tried several times to get it to boot as a rebuilt ISO but always the same results. Oh well. Maybe if someone gives me a flash drive for Christmas I will try it again.

If someone else figures out how to boot the ISO please let me know how you did it.

mdhorn commented 4 years ago

I give up. I tried several times to get it to boot as a rebuilt ISO but always the same results. Oh well. Maybe if someone gives me a flash drive for Christmas I will try it again.

If someone else figures out how to boot the ISO please let me know how you did it.

BTW, you do not need physical media, I boot Clear Linux OS ISOs many times a day in qemu. I also know it boots under Virtualbox as well as other environments.

My guess would be that fact you are changing the ISO. You could compare how we are making the hybrid ISO image versus your work: https://github.com/clearlinux/clr-installer/blob/master/isoutils/isoutils.go#L547

But since we do no have your boot environment, nor all your modifications, I'm not sure what other advice we can offer here.

EdPhere commented 4 years ago

My boot environment is in the top posting. Windows 10, grub2, 4 GB RAM, clear-32270-live-desktop.iso. And I am able to boot numerous ISOs via grub menus.

guest@porteus:~$ ls /mnt/sda6/ISOs/*.iso
/mnt/sda6/ISOs/2016-12-13-pixel-x86-jessie.iso*
/mnt/sda6/ISOs/APorteus-CINNAMON-v19.05.06-x86_64.iso*
/mnt/sda6/ISOs/APorteus-MULT_ja-v19.10.20-x86_64.iso*
/mnt/sda6/ISOs/GoboLinux-015-i686.iso*
/mnt/sda6/ISOs/MX-16_x64.iso*
/mnt/sda6/ISOs/OV.Porteus-OPENBOX-v5.0rc1-zstd-x86_64.iso*
/mnt/sda6/ISOs/Parrot-lite-3.6_amd64.iso*
/mnt/sda6/ISOs/Parted_Magic_2019_09_03.iso*
/mnt/sda6/ISOs/PhoenixOSInstaller_v3.0.3.459_x86_x64.iso*
/mnt/sda6/ISOs/Porteus-CINNAMON-v3.2.2-x86_64.iso*
/mnt/sda6/ISOs/Porteus-CINNAMON-v4.0-i586.iso*
/mnt/sda6/ISOs/Porteus-CINNAMON-v4.0-x86_64.iso*
/mnt/sda6/ISOs/Porteus-CINNAMON-v5.0rc1-x86_64.iso*
/mnt/sda6/ISOs/Porteus-Kiosk-3.7.0-i586.iso*
/mnt/sda6/ISOs/Porteus-LXQT-v3.1-x86_64.iso*
/mnt/sda6/ISOs/Porteus-OPENBOX-v4.0-x86_64.iso*
/mnt/sda6/ISOs/Porteus-OPENBOX-v4.0rc4-x86_64.iso*
/mnt/sda6/ISOs/Porteus-RazorQT-v3.0.1-i486.iso*
/mnt/sda6/ISOs/Porteus-RazorQT-v3.0.1-x86_64.iso*
/mnt/sda6/ISOs/Porteus-XFCE-v4.0.0-x86_64.iso*
/mnt/sda6/ISOs/Porteus-XFCE-v4.0rc4-x86_64.iso*
/mnt/sda6/ISOs/R-DriveImage_6.1.6107_OEMKit.iso*
/mnt/sda6/ISOs/REPAIR_DISC_WINDOWS_10_64_BIT.iso*
/mnt/sda6/ISOs/REPAIR_DISC_WINDOWS_7_64_BIT.iso*
/mnt/sda6/ISOs/REPAIR_DISC_WINDOWS_8_64_BIT.iso*
/mnt/sda6/ISOs/Recovery.iso*
/mnt/sda6/ISOs/Windows.iso*
/mnt/sda6/ISOs/abSlak_100216.iso*
/mnt/sda6/ISOs/android-x86-8.1-r2.iso*
/mnt/sda6/ISOs/antiX-16.1_x64-full.iso*
/mnt/sda6/ISOs/cd140201.iso*
/mnt/sda6/ISOs/clear-32270-live-desktop.iso*
/mnt/sda6/ISOs/debian-9.5.0-amd64-DVD-1.iso*
/mnt/sda6/ISOs/devuan_ascii_2.0.0_amd64_desktop-live.iso*
/mnt/sda6/ISOs/gparted-live-0.30.0-1-i686.iso*
/mnt/sda6/ISOs/install64.iso*
/mnt/sda6/ISOs/linuxmint-19.2-cinnamon-64bit.iso*
/mnt/sda6/ISOs/pebuilder.iso*
/mnt/sda6/ISOs/porteus-4.0-i586-20180415.iso*
/mnt/sda6/ISOs/porteus-4.0-x86_64-20180415.iso*
/mnt/sda6/ISOs/porteus-5.0-x86_64-20181208.iso*
/mnt/sda6/ISOs/porteus-5.0-x86_64-20181224.iso*
/mnt/sda6/ISOs/porteus-5.0rc1-x86_64-20190413.iso*
/mnt/sda6/ISOs/porteus-5.0rc1-x86_64.iso*
/mnt/sda6/ISOs/porteus-nemesis-v3.5-lxde-x86_64.iso*
/mnt/sda6/ISOs/runtimelivecd.iso*
/mnt/sda6/ISOs/slackware64-live-xfce-current.iso*
/mnt/sda6/ISOs/slitaz-4.0.iso*
/mnt/sda6/ISOs/ubuntu-18.04.1-desktop-amd64.iso*
/mnt/sda6/ISOs/ubuntu-18.04.2-desktop-amd64.iso*
guest@porteus:~$ 
mdhorn commented 4 years ago

@EdPhere My point was I do not have, nor do I plan to replicate, your environment for debugging purposes.

EdPhere commented 4 years ago

That's fine. Do whatever you want, there are many other Linux ISOs that work. I was just replying to your:

"But since we do no have your boot environment"

comment.

EdPhere commented 4 years ago

BTW By not supporting ISO booters, via grub2, your limiting your user base.

mdhorn commented 4 years ago

BTW By not supporting ISO booters, via grub2, your limiting your user base.

We release a new version of Clear Linux OS with a server and desktop ISOs 5-7 times a week. The ISO will the out-of-date very quickly. We recommend the latest ISO for trying out Clear Linux OS or for installing.

EdPhere commented 4 years ago

Wow!! So a very unstable distro. That will save me 20 mins of download time (and a flash drive).

BTW 32480 doesn't iso boot either.

EdPhere commented 4 years ago

This might help the Clear Linux developers with making bootable ISOs:

http://reboot.pro/topic/22254-usb-format-tool/?p=214087

ChugunovRoman commented 3 years ago

Are there any updates?

mdhorn commented 3 years ago

Are there any updates?

This issue was closed 18 months ago. If you need help or information, please open a new GitHub Issue. Also, this particular issue was with a modified ISO, not the version published and released by Clear Linux.