1

I have a simple Linux disk image that is made with syslinux and I want to boot it from a USB key. I originally partitioned the image with parted, so it has a partition table and the first partition is marked as bootable.

I dd'd the image to a USB key, and it will boot on a PC I have (call it computer A) but it won't boot another PC (computer B) that I need to use. So I know the image is legit.

If I take the same USB key, use unetbootin and make a bootable key with a Fedora ISO, it will boot on Computer B... So Computer B definitely supports booting from USB keys.

Here's the difference though: With the Fedora image, the USB key shows up as a hard disk (USB-HDD0) in the boot menu but with my custom disk image it shows up as a removable drive (USB-ZIP0).

What controls whether a USB key shows up as a hard disk or as a removable drive?

Update:
As per K7AAY's request I made a gparted live usb, ran

echo "0 0 0" > /sys/class/scsi_host/host0/scan

and there is no output. I tried host0 thru host4, no output. I don't know what that command is supposed to do.

jhufford
  • 151
  • As noted in https://unix.stackexchange.com/questions/4561/how-do-i-find-out-what-hard-disks-are-in-the-system it is highly platform dependent. Can you generate a second LiveUSB and see if there a change on Computer B when you run echo "0 0 0" >/sys/class/scsi_host/host/scan? Please paste the result into your question after clicking [edit]. Please do not click on Add Comment as new comments can shove old comments off screen; your information about your PC and installation should all go in the Question so we can all see your findings. – K7AAY Jul 08 '19 at 20:23

1 Answers1

0

This isn't an answer to the question but a workaround.

I got my custom linux build to boot on Computer B with a usb key by first making a FAT32 partition on the usb key using GParted, and marked the partition as bootable. Then I used dd to get a disk image from the usb key. Then I put the mbr on it, used syslinux on it and now it boots on computer B.

Gparted makes it a partition of type B (win95) and parted makes it type C (win95 lba). I tried using fdisk to change the partition made with parted to be type B, but it still doesn't work.

So there's something else that determines this whole thing. I would still like to know the answer. When googling this issue, it seems that bootable usb's has been a perennial problem.

jhufford
  • 151