LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   cannot boot from USB flash drive. (https://www.linuxquestions.org/questions/linux-hardware-18/cannot-boot-from-usb-flash-drive-593651/)

keratos 10-22-2007 07:34 AM

cannot boot from USB flash drive.
 
Hi thanks for reading.

I've got a USB 2GB flash drive and managed to setup a linux install on it, tried several distros, no probs.

However, this is a hard install and takes up a great deal of space.

Having googled a bit, I discovered that it is possible to run a LiveCD from USB flash, effectively the USB flash boots and runs as a LiveCD. I've downloaded puppy linux, DSL and pendrive images. All setup guides tell me to use syslinux -sf /dev/sdX which I did but at boot time, the card simply doesnt boot.

I can mount the USB flash drive and see the syslinux.csf, the live CD "bootable" files etc.

It just refuses to run syslinux and boot.

It does boot with a "proper" install and GRUB but that's not what I want. Too big !!!

Any ideas what might be wrong? How can I check what is going on?

Peacedog 10-22-2007 06:37 PM

Hi keratos, Are you extracting the images to the device, or just copying the image to the device? Have you checked the bios to ensure that the boot options include the stick? There are several how to methods with different distros here.
Good luck. ;-)

keratos 10-22-2007 08:16 PM

erm,...

if the BIOS wasnt working then it wouldnt boot off GRUB, did you read the post above my friend ?? second line !?

pendrivelinux was the tutorial I'm using.

I need something "more clever"

thanks anyway.

dracolich 10-23-2007 08:15 AM

Have you checked out Wolvix? It's like Ubuntu built on top of Slackware instead of Debian. The Cub version takes about 240MB and Hunter takes 512MB. It comes with a USB installer that handles all the formatting syslinux stuff. I used it to install onto a 512MB USB disk and it was as simple as a couple of mouse clicks.

Peacedog 10-23-2007 08:49 AM

Quote:

if the BIOS wasnt working then it wouldnt boot off GRUB, did you read the post above my friend ?? second line !?
It wasn't clear to me whether you had installed GRUB to the stick or hard drive my friend. You also didn't answer my first question about the install method. If you're going to ask for help solving your problems in a public venue maybe you should be less sarcastic and just answer the questions people have about your situation. With that said,

Quote:

I need something "more clever"
For something "more clever", have you tried zeroing out the boot sector then trying a fresh install? If you've done multiple installs, the mbr of the stick could be hosed.

Good luck. ;-)

keratos 10-23-2007 10:32 AM

Quote:

Originally Posted by dracolich (Post 2933670)
Have you checked out Wolvix? It's like Ubuntu built on top of Slackware instead of Debian. The Cub version takes about 240MB and Hunter takes 512MB. It comes with a USB installer that handles all the formatting syslinux stuff. I used it to install onto a 512MB USB disk and it was as simple as a couple of mouse clicks.

Okay buddy, acknowledged, but I have tried several distros. Its not the distro thats the problem, it is something to with the MBR/boot process.

keratos 10-23-2007 10:35 AM

Quote:

Originally Posted by Peacedog (Post 2933696)
It wasn't clear to me whether you had installed GRUB to the stick or hard drive my friend. You also didn't answer my first question about the install method. If you're going to ask for help solving your problems in a public venue maybe you should be less sarcastic and just answer the questions people have about your situation. With that said,



For something "more clever", have you tried zeroing out the boot sector then trying a fresh install? If you've done multiple installs, the mbr of the stick could be hosed.

Good luck. ;-)


Okay, good idea. I shall try a dd=/dev/zero blah blah and try again.

Be back soon!

dracolich 10-23-2007 03:02 PM

I understood that you tried several distros already. I only thought Wolvix might be "more clever" because it eliminates having to manually format the disk and install syslinux.

I just reread your original post to find something I might've missed:
Quote:

I can mount the USB flash drive and see the syslinux.csf, the live CD "bootable" files etc.
Can you elaborate on this? What distro was it and by "live CD" files do you mean that you copied the files from a liveCD, installed a liveCD iso image to the pendrive, or something else. If I remember correctly live CD and live USB use different syslinuxes which means a CD distro installed onto USB will fail to boot. I read something about that recently when I made mine.

saikee 10-23-2007 03:26 PM

I believe the easiest way to put Puppy into a pen drive is download the iso, burn it into a CD, boot up Puppy as a Live CD and use its universal installer to install Puppy into a pen drive. Puppy does two install

(1) Normal install when the files are fully expanded. Changes to the setting are saved automatically.

(2) Frugal install when Puppy work as a Live CD. The system files are rolled into a compressed file on exit and everything is detect as though from the beginning each time. Settings saving are optional. It is about 1/4 to 1/5 of the size as a full install.

Another way of getting Linux onto a pen drive is to copy the content (not the file itself) of the iso after expanding it on a loop back device, substitute isolinux with Grub, copy the content over a pen drive and setup Grub in the pen drive MBR. Here is an example how to put 7 iso on a DVD and then copy the same into a pen drive.

syslinux is a Dos program, stored in a fat partition and require a boot up Dos to set it up. Grub is a lot easier.

keratos 10-24-2007 02:58 AM

Thanks for all the help guys.

From close examination of your comments, It may be helpful for me to clarify the position in more detail because I sense my request is not being understood.

To fully clarify (as above)...

I have managed to install several distros by either booting then installing from a LiveCD, or by mounting the ISO and copying files over. In both cases GRUB was installed and setup, and the boot process from USB pendrive worked seamlessly.

Saikee, the problem with this is that the linux install is huge (or can be). I just want a simple, say <512MB, linux live image to boot. That is why I do not want to create a hard install or indeed a frugal install.


May I refocus attention on the specific request: how do I get the pendrive to effectively boot like a liveCD, using syslinux and an effective "image" of a linux root? That is how most liveCDs work. In other words I want my pendrive to effectively act like a liveCD.

Those who are familiar with the liveCD boot process should understand this ;)

Currently, the pendrive is not even booting, its as though liveCD syslinux is not correctly setting up the pendrive for boot.

This is where dracolich's comment is interesting, about liveCD syslinux being different than USB. Is this correct?

For those interesting, here is the link I am using for instructions:
http://www.pendrivelinux.com/2007/05...tall-tutorial/

saikee 10-24-2007 04:35 AM

I thought the example link I gave explains it.

The procedure is that you copy the iso (explanded on a loop back device but same size as the iso) onto the USB pen drive and subsitute the isolinux with Grub. That is all. The result is not guaranteed because some distros may have been written to fetch files from a CD drive and it will not boot properly unless there is a CD drive with the expected files available.

An iso is the source of your distros. Being an iso means it must be burn onto a CD/DVD. The boot loader on a CD/DVD is isolinux. (A very small percentage of iso actually use Grub's own CD/DVD boot loader.) If you boot an expanded iso (so that you can see the interior and not just one file) from a hard disk or pen drive you need a different boot loader. syslinux is a Dos program and can only operate when you have boot up a Dos or Windows operating system. Alternatively you can use Grub which can operate whenever you are in Linux.

Since a pen drive is already in fat16 therefore you can choose either syslinux or Grub to boot it.

You won't get anything smaller than the iso file.

Also I have stated in my last post first paragraph that Puppy's installer can be used to install itself like a Live CD. This is exactly what you have asked for.

Additionally my suggested link is an example of putting 7 iso into a 2Gb space. All of them are held in iso sizes. Inside it Ubuntu and Mepis are two full size distro each requiring a 700Mb CD for burning. Mepis alone if installed would be 2.5Gb large but it works as a Live CD from extracting the 700Mb iso file packed inside the 2Gb pen drive.

Is this 7-iso in a 2Gb pen drive arrangement not the exact requirement you are after?

As reagrding the 512Mb size you can choose DSL (about 50Mb) or Puppy (100Mb) or several iso together to pack the 512 Mb space.

If you want syslinux then boot up Windows to do it but I don't think syslinux multi-boot more than one system. That is why I go with Grub.

Grub is a lot easier.

If the USB pen drive doesn't boot you can obtain a Grub prompt from booting up a Grub floppy or a Live CD that has Grub. With a grub prompt you can boot up the Linux in a pen drive even if you do not install a boot loader. Grub is really that easy and powerful because it can boot up Linux while other boot loader has failed or not installed. Whereas if syslinux fails you can do nothing.

Take a look at the last link of my siganture. A Grub floppy and a Linux Live CD are the two most lethal weapons in the booting business. It is no joke. I have not met an installed PC system that cannot be booted up by a Grub prompt!

keratos 10-24-2007 05:23 AM

Thanks for that, I am familiar with boot managers, MBRs, ISO and linux/MSDOS/Windows boot process however...

What I still have not managed to get through is the message that I do now want to use grub.

I would like to use syslinux inside a FAT16 MBR and partition.

It simply is not working and I dont know why.

**Once, again, the request if for assistance to debug what is happening** rather than options and links.

I did manage to get the MSDOS @INSERT SYSTEM DISK" message so clearly the wrong .SYS files are on the pendrive, but I used syslinux.

The process , seems, really simple.

I dont understand.

saikee 10-24-2007 06:37 AM

If you want to know why syslinux doesn't work in your case you should get the information from the horse's mouth.

keratos 10-24-2007 07:49 AM

saikee, thanks again for keeping in thread, however I just cannot stress and get my point across....

Not wishing to rebuff your attempts to assist, but, ..

I KNOW HOW TO DO THIS,
Your link (and others) are pointing me to information I already know.
What I needed is information on how to debug when things dont work.

Sorry :(


I have given up now and have installed puppy linux from the liveCD.Its not the distro I wanted and lacks the polished touch, but it does fit in a very small parition :) and does what I want through the console.

I tried everything:

clearing down the pendrive (dd if=/dev/zero of=/dev/sdb),
recreate the MBR (tried all sorts: FAT16, FAT32, linux etc.etc)
made it bootable using gparted, diskdrake etc.
Use GRUB, use WinXP, use Win95 dos boot managers to run a DOS based linux kernel, no luck.

tried everything !! [almost]


Ah well, I've spent enough time on this, must crack on.


All times are GMT -5. The time now is 03:36 PM.