No Go with USB pen drive

Booting, installing, newbie
Message
Author
Bruce B

#16 Post by Bruce B »

I'm back, pqmagic crashed

I think the Linux tools will work just fine, see screen shot below. I made this filesystem after it got all screwed up, mostly with the genuine cfdisk, note the version number in the picture.

It is FAT16, but GParted sees it as FAT32

BUT on further digging ...

I copied the bootsector to file for manual reading. Ouch, it's NOT an MS-DOS boot sector. What to do?

I'm ready to put in on the back burner as far as making it a bootable USB flash stick.

It might be an NT series of Windows is the best bet, which I don't have it (installed that is). But then maybe not.

It does work for me, as a viable rewritable and portable storage device, which is actually why I got it.

Wanna quit on this one?
Attachments
cfdisk-sda.png
(11.08 KiB) Downloaded 935 times

Bruce B

#17 Post by Bruce B »

What bothers me is:

I can no longer find the documentation on the cfdisk 2.12

I can't find documentation on the cfdisk GNU 1.0

Intuit it :)

PS I think 2.12r not 2.12q is the last of the legacy version. When I find it, I'll save it off so I won't lose it, ever, ever.

Bruce B

#18 Post by Bruce B »

I guess I didn't give up. In my ongoing quest to make the USB Flash Stick DOS bootable, I have more information to report.

-----------------

The Linux mkfs tools do not make a MS-DOS bootable boot sector. I could tell this simply by looking at it. But for further verification that it is not bootable, here is strings output from the boot sector:
This is not a bootable disk. Please insert a bootable floppy and
press any key to try again ...
--------------------

I also discovered how to access the USB with MS-DOS. I did this by installing DOSEMU and then installing MS-DOS in the emulator.

Unfortunately, the disk utilities portion of MS-DOS such as Sys, Format, and Fdisk won't work. The purported reason being, that the Stick is a network device.

----------------------

Now, having learned a number of things that don't work. I'm prepared to say: I think it's very feasible to install an MS-DOS boot sector in the USB Flash Drive, if one knows what they do.

From experience, here's a brief summary theory of difficulty levels.

a FAT32 boot sector would need be done with precision
a FAT16 boot sector > 120MB would require careful work
a FAT16 > 32 < about 120MB could be done with relative ease

-------------------------

What I've not yet tried is mformat, which may indeed write an MS-DOS compatible 'bootable' boot record. The reason why I've not tried it, is because I'd need to read up on how to use it, in this scenario.

If I ever do figure out how to make a (most any) USB Flash stick MS-DOS bootable with Linux tools, or any tools for that matter, it would certainly qualify as a worthwhile how to.

User avatar
Crash
Posts: 453
Joined: Fri 09 Dec 2005, 06:34
Location: Melbourne, FL

#19 Post by Crash »

A lot of what I say here is redundant, but I am stating it to have it all in one place:

Some observations:

I've had success with booting Puppy Linux on four different USB flash drives over the last year on about ten different computers. The type of computer and its BIOS are the discriminators - cockpit problems with the Puppy Universal Installer, etc. are usually not the problem.

By far the hardest part is getting your first computer to boot up - until that point you will not have yourself convinced that the USB stick is configured properly.

In general, computers of Athlon XP vintage or before don't do well booting direct from USB sticks. They require a floppy or CD to do the first level boot up, then go to the USB stick for the remainder of the boot. Wakepup2, either on floppy or as a bootable image on CD/DVD, works fine. This is the first step that I would recommend.

I have yet to find a computer that won't boot Puppy Linux on a USB flash drive using some variant of Wakepup2. The oldest computer I have tried is a Baby-AT K6-2 motherboard with a VIA MVP4 chipset. The newest ones I have tried are single-core Intel Pentium 4 and AMD Athlon 64 CPUs.

If your USB stick came with U3 software pre-installed, it will boot using Wakepup2, but you may have to uninstall the U3 software to be able to boot stand-alone. Simply reformatting the USB stick may not be enough. The U3 web site has an uninstall utility available which works fine.

There is another HP utility that I have good luck with. It can be found by simply searching for "HP boot utility" on Google - it is version 7.41.3790 and called cp006049.exe. It is big, 46 MB, and runs under XP. It is useful to convince yourself that you computer will boot up a USB stick. If you so much as get the message "loading vmlinuz", the USB device, computer, and BIOS are capable of being booted.

Other observations:

FAT16, FAT32, EXT2, or EXT3 all work on a USB stick. Some older sub-1GB sticks may not work with all computers using EXT2 or EXT3. I prefer the FAT partitions since they can be read by non-Linux operating systems and can be booted by Wakepup2 if the computer can't directly boot the USB stick.

Some computers require the USB stick to be inserted PRIOR to power-up.

Some computers require the internal hard drives to be DISABLED, either through the BIOS (Integrated devices -> IDE controller 0 -> disable) or by physically unplugging them.

"USB ZIP" seems to work OK as a BIOS first boot choice on some computers. Others have an explicit "USB boot" first choice. Some don't have any USB boot choice, but will still hunt for the USB stick if the internal hard drives are disabled.

If there is a USB Legacy Support option in the BIOS, it may need to be changed from off to on, although different computers require that setting to be the opposite way. It's a 50-50 chance. On one computer, it had to be "off" to boot to the USB stick through Wakepup2, but "on" to boot directly from power-up. Go figure.

Universal Installer has worked for USB sticks on every standard version of Puppy Linux for at least the last year.

The whole process of putting Puppy Linux on a USB stick can be done from a Live CD with or without a hard drive.

In order to be bootable from power-up, the BOOT FLAG of the USB flash device must be set "ON". If you turn off the boot flag using GParted and format it under Windows XP, the boot flag will still be turned off. You will have to set it back "on" with GParted or another program. If you delete the partition under GParted and re-create it, you will then have to set the boot flag "on" again.

Formatting a USB stick with Windows XP works OK. Formatting/Partitioning a USB stick using GParted works OK.

I recommend that if you can't get the USB drive to boot easily, try it out on other computers until you get success. The most important thing is to convince yourself that the issues have more to do with the particular computer and its BIOS, not the Puppy implementation.

Bruce B

#20 Post by Bruce B »

Crash,

Even if:

* motherboard would boot the usb stick

* it is partitioned

* formatted

* marked active

All the requirements for making the stick MS-DOS bootable are not necessarily met. It would also need an MS-DOS boot sector and the MS-DOS boot files.

The DOS files are easy to obtain and copy. Leaving the boot sector as the snag.

My quest is about how to make the USB stick MS-DOS bootable. Meaning it want it to be self-booting. Worded differently, I want to boot from the USB stick as the boot source, as opposed to booting to it from elsewhere. As in a fully self-contained multiple operating system.

I could try again running GRUB, but before it installed on /dev/hda1 MBR even though it was told to install on /dev/sda1 - this time I could install it on the superblock and put a DOS partition at the end of the stick.

Otherwise your XP suggestions might be the answer, but I've never considered installing it before. There may be some advantages in having an XP OS on the system. Just don't know what they are off hand.

XP might format it with the MS-DOS boot-sector, if not the HP utility you referenced might work.

Thanks for the tips and interest.

Bruce

PS - I'm pretty sure with GRUB you could bypass the booting requirements of an unbootable boot record by chainloader /io.sys as opposed to the more common chainloader +1

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#21 Post by Sage »

Crash: My most recent trials show that bootability is NOT necessarily a function of m/b-BIOS, nor AMD XP+ cpu. [I have a very large coterie of machines to check that one!]. Ditto readability/functionality. However, as I reported, WXP seems to confer some kind of reformatting capability - most strange for a non-DOS (or is it!!!) OS. A new suggestion is that many of these clones may be surplus or substandard strips with 'funny formats' to achieve greater size than intended. An old trick, in use since 8bit 180K discs used to run away with my monthly salary - sometimes, I could squeeze 240K of usable formatted space on them. Since then, an entire industry emerged around extended 1.44M formats, some of which caused physically damage to drives by jamming the heads against the buffers.
Probably all the commands to deal with these issues are present for CLI operators but are destined to remain a mystery to y.t. Nevertheless, U3 also sounds a likely candidate for confusion.

User avatar
Crash
Posts: 453
Joined: Fri 09 Dec 2005, 06:34
Location: Melbourne, FL

#22 Post by Crash »

I think the discriminator is really date of manufacture, not the type of processor. The manufacturers started paying attention to USB bootability only a few years ago. Before that, no one cared. So unless your hardware provider is diligent and releases updates to your BIOS, your computer may never be able to boot directly to a USB stick. I don't expect my K6-2 motherboard or my Abit KT7 motherboard to have a BIOS update soon, so I accept the fact that I have to push a floppy disk into those computers to boot up on a USB stick.

Concerning U3: There's good news and bad news. The good news is that it is going away soon. Sandisk is quietly removing this feature from their ads, still keeping the "Ready Boost" capability prominently displayed. This is because they struck a deal with Microsoft to have a "new and improved" version next year. I only hope that they include an uninstall utility with it. Many USB stick manufacturers advertise "Linux Compatible". I won't buy one if it doesn't say that.

Concerning XP: If you don't have XP, or just don't like it, you may know someone else who is willing to let you use their machine just for experiment. There may be one at the local computer shop that they may let you fiddle with. Some shop proprietors love to experiment with something new.

I haven't had any trouble lately with Puppy Linux and XP coexisting on the same hard drive, although I have reverted back to having Puppy on its own separate ext2 partition. I commonly download files to the XP NTFS partition from Puppy with no problems.

Concerning DOS bootability: The HP utility that I mentioned allows you to boot a floppy image of whatever you want. I have tried it with FreeDOS, DR-DOS, DOS 6.22, Win98 startup, you name it. It works really well. I even have a version of Wakepup2 on an SD card thanks to this utility (yes, one of the computers boots up right into an SD card - the floppy of the future?). The downside is you need Windows XP to use it.

Regarding the MBR: Puppy's Universal Installer gives you the option of putting on a new MBR as you go through its option screens. I find that the recommended one (mbr.bin) works fine on a USB stick.

Sage: You didn't mention what the type of USB stick you are using. The four that I have used are all Sandisk. I don't necessarily endorse them, but they are available everywhere and the lower capacity ones are getting real cheap. I even saw one ad that said "free after rebate"! Having said that, I am concerned about what Microsoft and Sandisk will do to this technology next year. Buy the old discontinued ones while you can.

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#23 Post by Sage »

Yes, yes, and yes. I did mention that I have a cheap clone stick. For what it's worth, they claim to offer W98 drivers at www.vfuel.net, but those are the same files already pre-loaded and don't work with W98! Been down roads like that many times....

Bruce B

#24 Post by Bruce B »

I finally made the flash stick ms-dos bootable. It is now drive C: on my otherwise non microsoft computer.

I did it with an ms-dos boot disk, fdisk and format. A first I was operating on the premise that dos wouldn't see a USB flash stick. So it didn't occur to me to try and set it up with ms-dos.

While it's true that dos doesn't natively see usb devices, it just happens that my motherboard does see it and at a low level sets it up sufficient for dos to have direct access and work with it the same as any hard disk.

MayB
Posts: 19
Joined: Mon 10 Sep 2007, 20:08

#25 Post by MayB »

Well, when I saw this command

./syslinux /dev/sda1

from this thread:

http://www.slax.org/forum/viewtopic.php ... 249b979be5

my troubles were gone forever.

Can't tell what happened last time I installed Puppy 2.16 on two different kinds of flashdrives (One is seen by win2k setup as "hda1").

The sticks are dos-formatted (16 or 32, who knows); alway get them running with:

syslinux /dev/sda1 #(not mounted(?!))
sync

from some Puppy.

Cheers

MayB
Posts: 19
Joined: Mon 10 Sep 2007, 20:08

#26 Post by MayB »

umounted my flashdrive and did

syslinux /dev/sda1

ok!

Looked at gparted, it is FAT32!

Read once a discussion "why".

Was a believer.

Cheers

BTW, don't remember the installation questions. For me it is ok "the drive is dos formatted..."

Bruce B

#27 Post by Bruce B »

Thanks for the link. I read up on it and made a reply.

DOS formatted and partitioned does NOT prepare a USB Flash Stick to be DOS bootable. That's been my challenge here, which I've finally figured out.

The Linux formatting utilities write a fine FAT partition with a non bootable boot sector.

One of the reasons I wanted it MS-DOS bootable, was to run GRUB for DOS. Also, to have access to low level DOS utilities and other tools on the USB stick.

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#28 Post by Sage »

Well, Bruce, you've stumbled on a USB bootability diagnostic. I tried it on a few systems. If you use a W98 boot-up FD and select CD support, when a USB stick is present, the CD drive usually shows as "D". However if one tries to 'see', fdisk or format /s the invisible "C" drive and get 'invalid' luck has run out!

MayB
Posts: 19
Joined: Mon 10 Sep 2007, 20:08

bootable

#29 Post by MayB »

Well, formatting isn*t make bootable.

The command always! works for me.

This line

default vmlinuz root=/dev/ram0 initrd=initrd.gz PMEDIA=usbflash

in syslinuxcfg is made by the puppy installer

Hope that helps!!

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#30 Post by Sage »

Nope, that doesn't help on some of the difficult sticks we are encountering. That's why I added the switch!

MayB
Posts: 19
Joined: Mon 10 Sep 2007, 20:08

#31 Post by MayB »

Sorry! On a short look haven't seen anything about a switch (HUB?)


Bruce B
The subject I took was installing Puppy on memorystick. Technically in the beginning when I used the stick only for data I also formated in win2k as fat with no problems. Then i got a shareware program with not much functions, but as I remember, and they mentioned ist, the dosfloppy-boot as on cd's was made with syslinux (i tried it).
Then I got the HP utilities -as told- and used them.
There was a good technically reason which I have forgotten to format larger usbstiscks (surely 1GB) as FAT32.
Switch: My BIOS recognizes the drives different (I only guess Floppy and HDD). When choosing one of the plugged ones, it takes the other!

Well, most of us understand the syntax of syslinux and grub, we hardly do them without confusing, so I use the given.

Puppies installer discusses "the mbr" and that was for me the point. Frugal install is only copying files, inclusive syslinux, ldlinux etc...
I only became accustomed to use: syslinux /dev/sda1; sync at the end of the installation. Fine Syslinux never failed then anymore.

That's my experience!

Cheers

Sage
Posts: 5536
Joined: Tue 04 Oct 2005, 08:34
Location: GB

#32 Post by Sage »

switch : /s - system switch.

Well, the XP machine I have access to contains an MSI m/b. It is now telling me that my USB stick is "High Speed and you have no high speed USB ports". Really useful! I presume they mean USB 2.0. That's because MSI do not recommend their own BIOS upgrades because they can lead to permanent lost access. Wow, what sort of company is this. Besides which, XP is a damn nuisance with NTFS - it ignores stuff I set in BIOS. [But, then, so does Linux!!]. And I don't care for what is promised for BIOS in future, either.

We need to redefine progress: one step forward, you know the rest...

Post Reply