Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Can a USB drive be formatted as ISO-9660?


  • Please log in to reply
29 replies to this topic

#1 DarkLordCthulhu

DarkLordCthulhu

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 422 posts
  • Location:The bash shell
  • Programming Language:C, JavaScript, Bash, Others
  • Learning:Ruby, Others

Posted 27 August 2010 - 08:37 PM

I'm sorry that this is the third thread of mine regarding my attempt to install Debian, but I'm totally clueless and I really need help. I have downloaded an ISO file for a bootable Debian installer. I wrote the ISO to a USB drive and it failed to boot, saying it couldn't find anything to boot from. I figured out one of the problems, which was that I hadn't set the boot flag. I set the partition that the ISO file was on to boot and tried booting again. This time, I didn't get the "No operating system found" message from the BIOS, but still the installer failed to start.

I think the problem now is that the filesystem is fu¬Ęked up. I tried writing an ISO file, presumably using the ISO-9660 filesystem, to a partition on a USB drive that was formatted for FAT32. In order for the BIOS to find the filesystem, I need to format the partition to ISO-9660, but there is no option for that filesystem in GParted. I'm beginning to think maybe it's impossible to do this from a USB drive; ISO files are intended to be written to CDs and DVDs after all. This makes sense as I think CD-Rs, CD-RWs, and the like are preformatted as ISO-9660 while USB drives are by standard formatted as FAT32.

Now I have created a new partition table on a USB drive with two unformatted partitions in hopes that maybe the program writing the installer will format it when it writes the ISO. I don't know if this will work; probably not. The partition diagram looks exactly the same in GParted, with the same error message saying it can't detect a filesystem, but then GParted doesn't recognize ISO-9660 anyway. I really wish it did, though. I mean, it has options for obscure stuff that I've never even heard of like jfs and xfs, and it even lets you set up partitions for swapping, but no ISO. WTF?
  • 0

#2 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 27 August 2010 - 09:07 PM

How many times did we say to not make a partition on the USB? And ISO-9660 is relevant to the medium written on, NOT the ISO (only the sizing).

Imagine the USB is a harddisk, the ISO needs to write to the first sector (IE: With dd/a binary copying tool) for the BIOS to read it as a bootable sector, if you partition it, it writes an MBR destroying any chance of the BIOS doing anything with it.

The MBR will be empty thus saying "No operating system found" when BIOS attempts to boot from it, this is why you can't partition it.

Also excuse the endless advice that doesn't seem to work, it seems your computer is set up in quite odd ways, it's if not impossible for us to give you a magic "answer", we only could if we were sitting there beside you!
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#3 DarkLordCthulhu

DarkLordCthulhu

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 422 posts
  • Location:The bash shell
  • Programming Language:C, JavaScript, Bash, Others
  • Learning:Ruby, Others

Posted 27 August 2010 - 09:24 PM

The problem with USB drives is they are usually already partitioned, with a single FAT32 partition occupying the entire drive. That's the way it has been with every USB drive I've used. I tried deleting all partitions from a USB drive and writing the ISO to the device itself, but I couldn't do it, probably because all the memory was unallocated. I'm completely at a loss for what to do, and pretty soon I'm just going to give up with the ISO and RTFM for alternative methods, but first I want to see if it can indeed be done. Also, what did you mean by "ISO-9660 is relevant to the medium written on, not the ISO".
  • 0

#4 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 27 August 2010 - 09:52 PM

Fine, since methods which were tried and true seem to not work, why not direct copy the boot image to USB?? Lets see if this works, I bet you it will.
Download boot.img.gz from here: ftp.osuosl.org :: Oregon State University Open Source Lab

Run this command on your empty FAT32 USB:
zcat boot.img.gz > /dev/sdX <---- X not sdaX

Mount it:
mount /dev/sdX /mnt/

Download Netinst from here, note a good KDE torrent client is Ktorrent, or Azeurus, or look on another site for a non-torrent download:
Debian -- Network install from a minimal CD

Copy files (non-binary copy, so it can't mess up!):
cp netinstimagename.iso /mnt

And BAM! Restart and see if that works. This bypasses the MBR ** and uses a bootloader to start the kernel (installation hook)
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#5 DarkLordCthulhu

DarkLordCthulhu

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 422 posts
  • Location:The bash shell
  • Programming Language:C, JavaScript, Bash, Others
  • Learning:Ruby, Others

Posted 27 August 2010 - 11:07 PM

Four partitions for Windows 7, no Windows 7 install disc, monitoring my computer when I'm in Windows, and now the BIOS is barfing whenever I try to boot from a USB. I hate Hewlett Packard. Don't get me wrong, they make great printers, but the way they set up their PCs is restrictive, crippling, and annoying. Next PC I get will probably be a VAIO.

Anyway, thanks for then advice and the link. I don't know anything about BitTorrent, but I have KTorrent on Knoppix. I should learn a thing or two more before I go further.
  • 0

#6 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 28 August 2010 - 01:14 AM

OEM computers are failure for modification, yeah. Glad I could give some advice that I can, trust me I know the **** that goes on with installs, sometimes programs or installs randomly fail or don't work for no reason, there's just too much involved with installing certain things. You just got unlucky with it all.

Bittorrent is basically a global P2P protocol, sites use it to offload bandwidth strain, so you download off clients as well with faster speeds. It's a useful tool to download big files off many peers.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#7 DarkLordCthulhu

DarkLordCthulhu

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 422 posts
  • Location:The bash shell
  • Programming Language:C, JavaScript, Bash, Others
  • Learning:Ruby, Others

Posted 28 August 2010 - 05:52 AM

I put in a fresh, virgin (right out of the package) USB drive, downloaded the boot.img.gz, and cated it onto the device, and nothing happened. I also couldn't mount it, because it said it was already mounted. sdc1 was mounted anyway. As I said, these drives are already partitioned, with a single partition formatted as FAT32. There's not really much I can do about the MBR other than cat to the partition and set the boot flag.
  • 0

#8 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 28 August 2010 - 03:12 PM

Unmount it then.
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#9 DarkLordCthulhu

DarkLordCthulhu

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 422 posts
  • Location:The bash shell
  • Programming Language:C, JavaScript, Bash, Others
  • Learning:Ruby, Others

Posted 28 August 2010 - 04:19 PM

I tried unmounting the device (/dev/sdc) but it wouldn't let me. It would only let me unmount the partition /dev/sdc1. I unmounted what I could, then ran zcat. Nothing showed up. I mounted /dev/sdc at /mnt, and when I looked at /media, there was only a directory for /sdc1. Still nothing on the drive. Here is my command line activity:

knoppix@Microknoppix:/tmp$ sudo umount /dev/sdc1
knoppix@Microknoppix:/tmp$ sudo umount /dev/sdc
umount: /dev/sdc: not mounted
knoppix@Microknoppix:/tmp$ ls /dev/sd*
/dev/sda  /dev/sda1  /dev/sda2  /dev/sda3  /dev/sdc  /dev/sdc1
knoppix@Microknoppix:/tmp$ zcat boot.img.gz > /dev/sdc
knoppix@Microknoppix:/tmp$ mount /dev/sdc /mnt  
mount: only root can do that
knoppix@Microknoppix:/tmp$ sudo mount /dev/sdc /mnt
knoppix@Microknoppix:/tmp$ ls /media
sda1  sda2  sdb1  sdb2  sdc1  sr0
knoppix@Microknoppix:/tmp$ ls /media/sdc1
knoppix@Microknoppix:/tmp$ 

I also tried listing /mnt:

knoppix@Microknoppix:/tmp$ ls /mnt
adgtk.cfg     f10.txt  f6.txt  g2ldr.mbr    linux       stdmenu.cfg
adtxt.cfg     f2.txt   f7.txt  gtk.cfg      menu.cfg    syslinux.cfg
disk.lbl      f3.txt   f8.txt  initrd.gz    prompt.cfg  txt.cfg
exithelp.cfg  f4.txt   f9.txt  initrdg.gz   setup.exe   vesamenu.c32
f1.txt        f5.txt   g2ldr   ldlinux.sys  splash.png  win32-loader.ini

I couldn't find anything resembling sdc or boot.img.

So far I have never been able to mount devices, only partitions. I think if I did zcat boot.img.gz > /dev/sdc1 and then set the boot flag on that partition, then it would still work the same way that it showed in the manual.
  • 0

#10 DarkLordCthulhu

DarkLordCthulhu

    CC Devotee

  • Senior Member
  • PipPipPipPipPipPip
  • 422 posts
  • Location:The bash shell
  • Programming Language:C, JavaScript, Bash, Others
  • Learning:Ruby, Others

Posted 28 August 2010 - 04:35 PM

Wait, actually, the files listed in /mnt are the Debian install files. But how do I know if it's permanent? What precisely does mounting to /mnt do? Sorry, I'm not very knowledgeable about the Linux filesystem.

Another thing I don't get - what does copying the ISO with cp achieve? It's still compressed.
  • 0

#11 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 28 August 2010 - 04:42 PM

I guess to clearify:

  • /media/ are your mounted devices, if sdc appears in there than you must run umount /media/sdc to unmount it. (/mnt/ just for knoppix to mount to the host FS)
  • zcat simple ungzips's the boot.img.gz archive and redirects the stream to /dev/sdc, so you shouldn't see any output on the console.
What I should also mention is you're right, the whole drive is technically a single partition, but you should not set any flags. Setting a boot flag will tell BIOS to start USB as an HDD first, although this is in a way what you want, you only need boot.img in the first sector of the partition for it to boot the USB up first.

Try unmounting, running the zcat command again and mounting it, with mount /dev/sdc /media/sdc and check if boot.img is in there. if /media/sdc doesn't exist and it complains make it with mkdir /media/sdc
  • 0

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#12 Guest

Guest

    CC Devotee

  • Expert Member
  • PipPipPipPipPipPip
  • 914 posts
  • Programming Language:C

Posted 28 August 2010 - 04:42 PM

Wait, actually, the files listed in /mnt are the Debian install files. But how do I know if it's permanent?

Well, it's permanent unless you delete or overwrite the files on the drive yourself.

What precisely does mounting to /mnt do? Sorry, I'm not very knowledgeable about the Linux filesystem.

Mounting to /mnt does the same thing as mounting anywhere else. It makes the files on a partition available inside the /mnt directory.

By the way, the drive looks set up properly now. You should try booting off of it.
  • 0
Root Beer == System Administrator's Beer
Download the new operating system programming kit! (some assembly required)




Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download