linux-live icon indicating copy to clipboard operation
linux-live copied to clipboard

No bootable ISO

Open TeoColuccio opened this issue 3 years ago • 8 comments

I followed all suggested steps, but I'm not able to create a bootable live of debian. The steps that i followed are:

  1. I installed a clean debian 11 through netinst, and I simply installed/removed same package.
  2. I downloaded linux-live.zip, extracted and moved it in /tmp.
  3. Without modify "config" file, I launched ./build script and it works fine.
  4. Finally I created the ISO with /tmp/gen_linux_iso.sh. Now if I write this ISO with dd on a usb drive, it is not recognized as bootable by multiple computers. So I tried also using ventoy, but nothing. Finally, I tried simply to copy "linux" folder to usb and launched "linux/boot/bootinst.sh" but there is an error:
$ ./bootinst.sh 
./extlinux.x64: not a fat, ntfs, ext2/3/4, btrfs, xfs orufs1/2 filesystem: .
Error installing boot loader.
Read the errors above and press enter to exit...

TeoColuccio avatar May 27 '22 16:05 TeoColuccio

Hello @TeoColuccio, It seems like your target device(the one with bootinst.sh), Doesn't have a filesystem compatible with isolinux/syslinux/extlinux Hence, extlinux.x64 is complaining, To fix this issue, just format your target device to any of the following filesystems:

  1. Fat32
  2. NTFS
  3. ext2
  4. ext3
  5. ext4
  6. btrfs
  7. xfs
  8. orufs1
  9. orufs2

Note: Out of the above-mentioned filesystems, Fat32 is most widely supported.

To change the filesystem of a device you can just format it.

!!Warning!!

Formatting deletes data on the volume/partition selected, it is recommended to backup any important data on the disk(target device).

To format the partition/volume you can use a variety of software. Namely:

  1. gparted
  2. partition-manager

Regards, ~Tree-t :)

tree-t avatar May 28 '22 09:05 tree-t

Ok, I tried to (re-)format my device to Fat32, but there is a new error:

sudo sh bootinst.sh 
[sudo] password for teo: 
bootinst.sh: line 18: ./extlinux.x64: Permission denied
Error installing boot loader.
Read the errors above and press enter to exit...

But in any case, the first attempt of my step 4 was simply to copy with dd the generated iso image, only this is not bootable. I also tried using Ventoy, but nothing. There is some easier way to directly generate a bootable iso maybe? So as not to go through the zip file...

4. Finally I created the ISO with /tmp/gen_linux_iso.sh. Now if I write this ISO with dd on a usb drive, it is not recognized as bootable by multiple computers.

TeoColuccio avatar May 29 '22 19:05 TeoColuccio

Hello @TeoColuccio, From :

I followed all suggested steps, but I'm not able to create a bootable live of debian. The steps that i followed are:

  1. I installed a clean debian 11 through netinst, and I simply installed/removed same package.
  2. I downloaded linux-live.zip, extracted and moved it in /tmp.
  3. Without modify "config" file, I launched ./build script and it works fine.
  4. Finally I created the ISO with /tmp/gen_linux_iso.sh. Now if I write this ISO with dd on a usb drive, it is not recognized as bootable by multiple computers. So I tried also using ventoy, but nothing. Finally, I tried simply to copy "linux" folder to usb and launched "linux/boot/bootinst.sh" but there is an error:
$ ./bootinst.sh 
./extlinux.x64: not a fat, ntfs, ext2/3/4, btrfs, xfs orufs1/2 filesystem: .
Error installing boot loader.
Read the errors above and press enter to exit...

In step number 4:

  1. use /tmp/gen_linux_zip.sh
  2. Format your target device to Fat32
  3. Copy the zip to the target device
  4. Cd to the target device
  5. Use:
sudo unzip *.zip
  1. Remove the .zip file(optional)
  2. Use:
 sudo chmod +x linux/boot/*
  1. Use:
sudo ./linux/boot/bootinst.sh

And it should work perfectly.

Note: To solve the current problem:

Ok, I tried to (re-)format my device to Fat32, but there is a new error:

sudo sh bootinst.sh 
[sudo] password for teo: 
bootinst.sh: line 18: ./extlinux.x64: Permission denied
Error installing boot loader.
Read the errors above and press enter to exit...

But in any case, the first attempt of my step 4 was simply to copy with dd the generated iso image, only this is not bootable. I also tried using Ventoy, but nothing. There is some easier way to directly generate a bootable iso maybe? So as not to go through the zip file...

  1. Finally I created the ISO with /tmp/gen_linux_iso.sh. Now if I write this ISO with dd on a usb drive, it is not recognized as bootable by multiple computers.

You just need to make the files in linux/boot directory executable, you can do that by using:

sudo chmod +x *

In the directory linux/boot.

Note: It is perfectly safe to edit the config file as it is meant to be edited, although not editing it is also fine.

tree-t avatar May 30 '22 08:05 tree-t

Maybe the problem is that you can't make bootinst.sh executable:

sudo chmod +x *
[sudo] password di teo: 
teo@hp-envy:/media/teo/FE27-BA16/linux/boot$ ls -l
totale 11320
-rwxr-xr-x 1 teo teo    1292 27 mag 15.31 bootinst.bat
-rw-r--r-- 1 teo teo    1236 27 mag 15.31 bootinst.sh
-rw-r--r-- 1 teo teo    7336 27 mag 15.31 bootlogo.png
drwxr-xr-x 3 teo teo    8192 27 mag 15.31 EFI
-rw-r--r-- 1 teo teo  208480 27 mag 15.31 extlinux.x32
-rw-r--r-- 1 teo teo  209424 27 mag 15.31 extlinux.x64
-rw-r--r-- 1 teo teo 3431648 27 mag 15.31 initrfs.img
-rw-r--r-- 1 teo teo   40960 27 mag 15.31 isolinux.bin
-rw-r--r-- 1 teo teo  116552 27 mag 15.31 ldlinux.c32
-rw-r--r-- 1 teo teo  181944 27 mag 15.31 libcom32.c32
-rw-r--r-- 1 teo teo   23628 27 mag 15.31 libutil.c32
-rw-r--r-- 1 teo teo     440 27 mag 15.31 mbr.bin
-rw-r--r-- 1 teo teo   46909 27 mag 15.31 pxelinux.0
-rw-r--r-- 1 teo teo     457 27 mag 15.31 syslinux.cfg
-rwxr-xr-x 1 teo teo  126511 27 mag 15.31 syslinux.com
-rwxr-xr-x 1 teo teo  243712 27 mag 15.31 syslinux.exe
-rw-r--r-- 1 teo teo   26684 27 mag 15.31 vesamenu.c32
-rw-r--r-- 1 teo teo 6843648 27 mag 15.31 vmlinuz
teo@hp-envy:/media/teo/FE27-BA16/linux/boot$ sudo chmod +x bootinst.sh 
teo@hp-envy:/media/teo/FE27-BA16/linux/boot$ ls -l
totale 11320
-rwxr-xr-x 1 teo teo    1292 27 mag 15.31 bootinst.bat
-rw-r--r-- 1 teo teo    1236 27 mag 15.31 bootinst.sh
-rw-r--r-- 1 teo teo    7336 27 mag 15.31 bootlogo.png
drwxr-xr-x 3 teo teo    8192 27 mag 15.31 EFI
-rw-r--r-- 1 teo teo  208480 27 mag 15.31 extlinux.x32
-rw-r--r-- 1 teo teo  209424 27 mag 15.31 extlinux.x64
-rw-r--r-- 1 teo teo 3431648 27 mag 15.31 initrfs.img
-rw-r--r-- 1 teo teo   40960 27 mag 15.31 isolinux.bin
-rw-r--r-- 1 teo teo  116552 27 mag 15.31 ldlinux.c32
-rw-r--r-- 1 teo teo  181944 27 mag 15.31 libcom32.c32
-rw-r--r-- 1 teo teo   23628 27 mag 15.31 libutil.c32
-rw-r--r-- 1 teo teo     440 27 mag 15.31 mbr.bin
-rw-r--r-- 1 teo teo   46909 27 mag 15.31 pxelinux.0
-rw-r--r-- 1 teo teo     457 27 mag 15.31 syslinux.cfg
-rwxr-xr-x 1 teo teo  126511 27 mag 15.31 syslinux.com
-rwxr-xr-x 1 teo teo  243712 27 mag 15.31 syslinux.exe
-rw-r--r-- 1 teo teo   26684 27 mag 15.31 vesamenu.c32
-rw-r--r-- 1 teo teo 6843648 27 mag 15.31 vmlinuz

Even via gui, I can't make it executable.

But putting this aside, via gen_linux_iso.sh, can't I directly generate a bootable iso somehow? This would be the best solution. It is also strange that a bootable iso is not generated by default

TeoColuccio avatar May 30 '22 08:05 TeoColuccio

Hello @TeoColuccio, For:

Maybe the problem is that you can't make bootinst.sh executable:

sudo chmod +x *
[sudo] password di teo: 
teo@hp-envy:/media/teo/FE27-BA16/linux/boot$ ls -l
totale 11320
-rwxr-xr-x 1 teo teo    1292 27 mag 15.31 bootinst.bat
-rw-r--r-- 1 teo teo    1236 27 mag 15.31 bootinst.sh
-rw-r--r-- 1 teo teo    7336 27 mag 15.31 bootlogo.png
drwxr-xr-x 3 teo teo    8192 27 mag 15.31 EFI
-rw-r--r-- 1 teo teo  208480 27 mag 15.31 extlinux.x32
-rw-r--r-- 1 teo teo  209424 27 mag 15.31 extlinux.x64
-rw-r--r-- 1 teo teo 3431648 27 mag 15.31 initrfs.img
-rw-r--r-- 1 teo teo   40960 27 mag 15.31 isolinux.bin
-rw-r--r-- 1 teo teo  116552 27 mag 15.31 ldlinux.c32
-rw-r--r-- 1 teo teo  181944 27 mag 15.31 libcom32.c32
-rw-r--r-- 1 teo teo   23628 27 mag 15.31 libutil.c32
-rw-r--r-- 1 teo teo     440 27 mag 15.31 mbr.bin
-rw-r--r-- 1 teo teo   46909 27 mag 15.31 pxelinux.0
-rw-r--r-- 1 teo teo     457 27 mag 15.31 syslinux.cfg
-rwxr-xr-x 1 teo teo  126511 27 mag 15.31 syslinux.com
-rwxr-xr-x 1 teo teo  243712 27 mag 15.31 syslinux.exe
-rw-r--r-- 1 teo teo   26684 27 mag 15.31 vesamenu.c32
-rw-r--r-- 1 teo teo 6843648 27 mag 15.31 vmlinuz
teo@hp-envy:/media/teo/FE27-BA16/linux/boot$ sudo chmod +x bootinst.sh 
teo@hp-envy:/media/teo/FE27-BA16/linux/boot$ ls -l
totale 11320
-rwxr-xr-x 1 teo teo    1292 27 mag 15.31 bootinst.bat
-rw-r--r-- 1 teo teo    1236 27 mag 15.31 bootinst.sh
-rw-r--r-- 1 teo teo    7336 27 mag 15.31 bootlogo.png
drwxr-xr-x 3 teo teo    8192 27 mag 15.31 EFI
-rw-r--r-- 1 teo teo  208480 27 mag 15.31 extlinux.x32
-rw-r--r-- 1 teo teo  209424 27 mag 15.31 extlinux.x64
-rw-r--r-- 1 teo teo 3431648 27 mag 15.31 initrfs.img
-rw-r--r-- 1 teo teo   40960 27 mag 15.31 isolinux.bin
-rw-r--r-- 1 teo teo  116552 27 mag 15.31 ldlinux.c32
-rw-r--r-- 1 teo teo  181944 27 mag 15.31 libcom32.c32
-rw-r--r-- 1 teo teo   23628 27 mag 15.31 libutil.c32
-rw-r--r-- 1 teo teo     440 27 mag 15.31 mbr.bin
-rw-r--r-- 1 teo teo   46909 27 mag 15.31 pxelinux.0
-rw-r--r-- 1 teo teo     457 27 mag 15.31 syslinux.cfg
-rwxr-xr-x 1 teo teo  126511 27 mag 15.31 syslinux.com
-rwxr-xr-x 1 teo teo  243712 27 mag 15.31 syslinux.exe
-rw-r--r-- 1 teo teo   26684 27 mag 15.31 vesamenu.c32
-rw-r--r-- 1 teo teo 6843648 27 mag 15.31 vmlinuz

Even via gui, I can't make it executable.

But putting this aside, via gen_linux_iso.sh, can't I directly generate a bootable iso somehow? This would be the best solution. It is also strange that a bootable iso is not generated by default

You can remount your drive from terminal and then use chmod and execute the command. Example:

sudo umount /media/teo/FE27-BA16 && sudo mkdir /media/sdb1 && sudo mount /dev/sdb1 /media/sdb1 && cd /media/sdb1/linux/boot && sudo chmod +x bootinst.sh && sudo ./bootunst.sh

tree-t avatar May 30 '22 10:05 tree-t

sudo umount /media/teo/FE27-BA16 && sudo mkdir /media/sdb1 && sudo mount /dev/sdb1 /media/sdb1 && cd /media/sdb1/linux/boot && sudo chmod +x bootinst.sh && sudo ./bootunst.sh

Unmounting and mounting manually the driver, it works fine, many thanks. Now, one last thing... Is there a way to make the ISO generated bootable directly? For my use it would be more useful to have an iso file than actually a drive.

TeoColuccio avatar May 30 '22 19:05 TeoColuccio

Hello @TeoColuccio, Sorry for the late reply, But it seems like at the current moment its not possible as the bootable iso will complain about Idlinux.c32 being missing (although its not), So until the Idlinux.c32 issue is solved, The making of bootable iso might just be not possible. :(

Maybe @Tomas-M can do something about the Idlinux.c32 issue?

Regards, ~Tree-t

tree-t avatar Jun 03 '22 11:06 tree-t

hi

sudo sh bootinst.sh [sudo] password for teo: bootinst.sh: line 18: ./extlinux.x64: Permission denied Error installing boot loader. Read the errors above and press enter to exit...

sudo cp -r 'source' -t 'target'

-t, --target-directory=DIRECTORY copy all SOURCE arguments into DIRECTORY

worked fine for me on NTFS formated stick - seems problem is on fat or try with rsync command

AcPLive2022 avatar Jun 09 '22 19:06 AcPLive2022

Hi all, I have tried may times with different methods (also formatting in different way) and I usually get a USB which is not bootable. Now with the above method when I execute

sudo ./linux/boot/bootinst.sh

I get

./extlinux.x64: Not a directory: ./AHOS/boot
Error installing boot loader.
Read the errors above and press enter to exit...

Pleas Help! Thanks you in advance

Imagoculturae avatar Jul 13 '23 15:07 Imagoculturae