Puppy2 Installer and USB tests; a bit long

Under development: PCMCIA, wireless, etc.
Message
Author
JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

Puppy2 Installer and USB tests; a bit long

#1 Post by JustGreg »

I have installed Puppy2 on several USB devices. Here is what I found. The first thing is USB-HDD is still work in progress and is not available. The installations were done using the USB Flash option.

The first device to be tried was a Kanguru Zipper 1 Gigabyte drive. I have previously installed Puppy 1.0.7 on it and made it bootable using Grub. I put the orginial master boot record on it and changed the single partion to MSDOS Fat16 (type 6). Use mkfs.msdos to create a clean file system. I used the Puppy2 universal installer to install the Puppy2. I used the option to make the device bootable, since with the orginial master boot record, the device would not boot. The
installation was finished with no errors. I mounted and check the device for the installation files. All the needed files (expect for Puppy-save.3fs, which is made on shutdown) were there including Syslinux needed for booting. I tried to boot the device. No joy, the boot sequence went directly to my hard drive install. I happen to know the orginial master boot record has all zeros in place of the "bootstrap loader" code. The installation did not install the syslinux "boot strap loader" code.

The master boot record contains two sections. The first 446 bytes of it has the "boot strap loader" code and the second section of 66 bytes has partition table. Using a known good device that booted up properly using Syslinux, I copied the "boot strap loader" section using the DD command to a
file called sys-nopart.mbr. I then copied the file using the DD command to the Kanguru Zipper device. This time the device booted up proper and I had Puppy2 runing. On shutdown, I save the settings to device. Puppy-save.3fs was created. I booted up the device and everything started correctly including the saved settings. I have attached the file sys-nopart.mbr in zipped format for other people's use.

I tried a second version with the Zipper to see if the installer could handle a multiple partition device. I re-partitioned the
Kanguru Zipper into two partions. The first was 73 Megabyte MSDos FAT16 partition and the second was the rest of the zipper device space as EXT3 file system. I created clean file systems for both partition using mkfs commands. I still had the Syslinux boot code present for boot purposes. I installed Puppy2 to first partition without a problem. It booted correctly. On shutdown, I selected the second partition (ext3 file system) for the Puppy-save.3fs location. I was hoping that Puppy2 would recognize the presence of ext3 file system and use it as is instead of the squashed
file system. I thought maybe Puppy2 would create a directory called Puppy-save. It used the squashed file system with the ext3 partition. On reboot, everything was restored properly. Clearly a success without any problems.

The second device that I checked was a SanDisk 512 Megabyte Mini. This device has been bootable since I found out one had to turn on "Legacy USB keyboard support" in my BIOS to get USB devices to boot. I did a Puppy2 install to the device. It was smooth sailing with the installer.
I also selected the option to make the device bootable with intstaller. The device booted up properly. I shutdown and selected the MSDOS FAT16 partition on device to save Puppy-save.3fs file. Upon reboot, Puppy2 came up with the correct settings. Puppy-save.3fs was 415 meagabytes in
size. If you want the 512 Megabyte size you need to used a device that is 1 Gigabyte in size.

The third device tried was a SanDisk 512 Megabyte Micro. It is the same chip set as Mini in a different package as far as I can tell. I brought this device recently to use with my SanDisk MP3 player. I have three other devices like it that all work fine. This one does not work properly with
the player, which made it "fair game" for experiments. The other devices have the "boot strap loader" code on them. This one does not! Did the Puppy2 install as usual and try to boot it. No joy. Copy sys-nopart.mbr using the DD command to it and tried to boot it. Puppy2 came up without
a problem. Puppy-save.3fs was created properly on shutdown. If you have a USB flash device that does not seem to boot. Use DD and hexedit to inspect the main boot record for the boot strap loader code. If the first 446 bytes are all zeroes, use DD command and sys-nopart.mbr to place the boot strap loader code there.

I want to see how small a device could be used. I have a old Micro Advantage 64 Megabyte device that is bootable with MSDos FAT16 partiton. I did a Puppy2 install to it. The install was completed without any problems or errors. After completing the install, I check to see how much free space was left using the DF command. It showed none.
I booted up the device and system. Puppy2 came up. On shutdown, I tried to save the setup. An error message reported the lack of space and shutdown. If you want to use an USB device and have a save file, then use a device with a minimum of 128 Megabytes size.

The last try was based on Puppy2 has syslinux 3.11. The version 3.11 has a loader for ext2 partitions called extlinux. I changed the partition and file system of the Zipper to Linux ext2. I tried to do an install of Puppy2 to it. I received an error message saying the installer only supports MSDOS partitions. Once again work in progress.

The extlinux loader does work. The Micro Advantage 64 Megabyte device has INSERT Linux (Insight Security Rescue Disk) on it now. It is formatted as ext2 and uses extlinux to boot.

I hope the above helps.

Enjoy life, Just Greg
Attachments
sys-nopart.mbr.gz
file in gzip format
(241 Bytes) Downloaded 979 times

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#2 Post by JustGreg »

One day, I will know how to use the Linux archieve tools. Here is the file sys-nopart.mbr zipped using gzip. To unzip, use
gunzip sys-nopart.mbr.gz
Attachments
sys-nopart.mbr.gz
File will be placed in /root/my-mbr
(241 Bytes) Downloaded 966 times
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

Great testing report :)

Puppy2 alpha 2 is quite a handful - you have to be gentle with her. Anyone else thinking of testing? Greg has set a high standard here . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
babbs
Posts: 397
Joined: Tue 10 May 2005, 06:35
Location: Tijuana, BCN, Mexico

Re: Puppy2 Installer and USB tests; a bit long

#4 Post by babbs »

JustGreg wrote:...
The installation did not install the syslinux "boot strap loader" code.
...
The master boot record contains two sections. The first 446 bytes of it has the "boot strap loader" code and the second section of 66 bytes has partition table. Using a known good device that booted up properly using Syslinux, I copied the "boot strap loader" section using the DD command to a file called sys-nopart.mbr. I then copied the file using the DD command to the Kanguru Zipper device. This time the device booted up proper and I had Puppy2 runing. ... I have attached the file sys-nopart.mbr in zipped format for other people's use.
...
The second device that I checked was a SanDisk 512 Megabyte Mini. This device has been bootable since I found out one had to turn on "Legacy USB keyboard support" in my BIOS to get USB devices to boot. I did a Puppy2 install to the device. It was smooth sailing with the installer.
...
The third device tried was a SanDisk 512 Megabyte Micro. It is the same chip set as Mini in a different package as far as I can tell. I brought this device recently to use with my SanDisk MP3 player. I have three other devices like it that all work fine. This one does not work properly with the player, which made it "fair game" for experiments. The other devices have the "boot strap loader" code on them. This one does not! Did the Puppy2 install as usual and try to boot it. No joy. Copy sys-nopart.mbr using the DD command to it and tried to boot it. Puppy2 came up without a problem.
...
Puppy-save.3fs was created properly on shutdown. If you have a USB flash device that does not seem to boot. Use DD and hexedit to inspect the main boot record for the boot strap loader code. If the first 446 bytes are all zeroes, use DD command and sys-nopart.mbr to place the boot strap loader code there.
...
I want to see how small a device could be used. I have a old Micro Advantage 64 Megabyte device that is bootable with MSDos FAT16 partiton. I did a Puppy2 install to it. The install was completed without any problems or errors. After completing the install, I check to see how much free space was left using the DF command. It showed none.
I booted up the device and system. Puppy2 came up. On shutdown, I tried to save the setup. An error message reported the lack of space and shutdown. If you want to use an USB device and have a save file, then use a device with a minimum of 128 Megabytes size.
...
Greg,

You packed a lot of good information into one posting... Well done!

I wish I know more about digging into the bootloader like that, but I hope your input helps to reduce the number of "my usb won't boot" postings.

How did you figure out the keyboard thing? Do you think that could be one of the main reasons SanDisk usb devices are reported most often as to not working? I'm going to add this information to the http://puppylinux.org/wikka/USBKeysTroubleBooting wiki page shortly.

Knowing about the 128MB minimum is a good thing. Again, thank you.

Babbs

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#5 Post by BarryK »

Hope I can post this ...the forum is misbehaving like anything
for me right now... get php error messages...

JustGreg, your testing is great.
I'm finally able to get back onto puppy2, and will have a good
look at your results! And the file!

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#6 Post by Lobster »

Have sent John Murga a PM (I am also having problems) about the forum
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#7 Post by JustGreg »

I'm glad the information is a help. It is nice to help out with something that is really worthwhile. I will try to follow up by getting some of my co-workers to let me inspect the master boot records of their usb devices. If I can get the devices and inspect the records, I will post the results in the User forum.

Babbs, I found the information about the master boot record on the web. Here is the url for an excellent article on the standard master boot record. The article even gives the 8080 assembler code of the "boot strap loader". It is:
http://thestarman.dan123.com/asm/mbr/STDMBR.htm
Alot of good information in the article.

Babbs, please feel free to use any of my postings on the Wikki pages. I am a bit of a DOS dinosaur and do not know the ways of the Wikki! Another item to learn about.

The keyboard thing was just perseverence. After about month of trying, I finally notice the light on the device was not lighting up on boot. I check my machine Bios and found the "legacy keyboard support" option and said, why not try it. It worked.

SanDisk definitely change their manufacturing process for their USB devices. I have several of flash devices. The older ones had the boot strap loader code and newer ones did not. I have talk to SanDisk support about this and got the usual reply of send the device back and we will give a new one. Even talking with Kanguru tech support about booting, got me the standard line about using only Windows XP and need to use the correct driver for Windows98. The Kanguru web site does provide the drivers for free but nothing on booting. Kanguru gave good responses and did try, but tech support was definitely for Windows operating systems.

I will do more looking at master boot records and hopefully come up with a list of devices that come from the manufacture with the boot code.

User avatar
babbs
Posts: 397
Joined: Tue 10 May 2005, 06:35
Location: Tijuana, BCN, Mexico

#8 Post by babbs »

JustGreg wrote:...
Babbs, I found the information about the master boot record on the web. Here is the url for an excellent article on the standard master boot record. The article even gives the 8080 assembler code of the "boot strap loader". It is:
http://thestarman.dan123.com/asm/mbr/STDMBR.htm
Alot of good information in the article.
...
Thanks for the link, I'll look it up in the near future.
JustGreg wrote:...I am a bit of a DOS dinosaur and do not know the ways of the Wikki!...
Just "Use the Force" Greg, with the wiki, the first step is to just type. You only need to learn more if you want to do any formatting. :)
JustGreg wrote:The keyboard thing was just perseverence. After about month of trying, I finally notice the light on the device was not lighting up on boot. I check my machine Bios and found the "legacy keyboard support" option and said, why not try it. It worked.
When I was updating the wiki page with your keyboard finding, I noticed that I had already recommended to enable all legacy usb support things. I wouldn't have thought that the keyboard setting would have held things up though...

As to SanDisk and others changing manufacturing process and their tech support... Its unfortunate that they are claiming to only support Windows. Hopefully, with more and more inquiries pertaining to Linux, they will begin to see that they need to re-think their business plans.

At 1GB each, I have a SanDisk micro, SanDisk mini, and a PNY Attache. What would you have me do to see how my devices compare to yours?

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#9 Post by JustGreg »

Yes, Babbs, please do check. Here is a quick way to check (I may be "preaching to the choir, Babbs, but this may help others):
Open a console window, console on the desktop,
change to Temp directory (cd Temp)
make sure usb-storage driver is place (modprobe usb-storage)
use dmesg to check for device, should be at the very end. dmesg should report as sda, sdb or sdc
dump the master boot record with dd if=/dev/sda of=block.mbr
use hexdump (Puppy 1.0.7) to view the file in hexadecimal;
command is hexdump block.mbr

The first entry should 33FA, BEFA or C033. The presence of FA in the first entry is important. It stands for the CLI (clear interrupt flag) machine command. It prevents the boot strap loader from being prempt by another software interrupt. I think C033 is the command to XOR the AX address with itself. This zeros the AX register. I have a Kingston device with different boot code that does work.

It is easy. If you see alot of 0000 entries starting at the first entry, then the device does not have the boot code. To make it bootable one has to add the boot code. See the first post of this one.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

User avatar
babbs
Posts: 397
Joined: Tue 10 May 2005, 06:35
Location: Tijuana, BCN, Mexico

#10 Post by babbs »

I'm not presently in Puppy right now, and I only have the PNY within easy reach...

First, a recommended modification to the hexdump command: hexdump block.mbr | more
Also, if you do this from a Linux outside of Puppy, you will probably need to be logged in as root to do the hexdump step (I did for Fedora). I was able to do the other steps as a user.

Here are the first few lines: (as you can see, I have the c033 version)

Code: Select all

0000000 c033 d08e 00bc fb7c 0750 1f50 befc 7c1b
0000010 1bbf 5006 b957 01e5 a4f3 becb 07be 04b1
0000020 2c38 097c 1575 c683 e210 cdf5 8b18 8b14
I'll pass off the info for the two Cruzers later...

Babbs

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#11 Post by JustGreg »

Thanks Babbs for the information. I will try to tommorrow to get some more devices from my co-workers.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

yomer
Posts: 4
Joined: Fri 03 Mar 2006, 10:00

Plz help with cruzer micro

#12 Post by yomer »

Hi Greg,
My 1GB cruzer micro seems to boot. But it lags when copying usr_cram.fs(I think it never finishes copying the file. It gets into puppy linux sometimes, but I lose my config every time. I get lots of SCSI disk error : host 0... I/O error: dev 08:01, sector xxxxx or something like it. I'm doing everythi g right, I know it because my lexar jumpdrive does work perfectly. Oh and I made the dd test to see if my usb drive was bootable and it seems so. It starts with c033 d08e 00bc fb7c ..... so it has no zeros. What else could be wrong?

User avatar
babbs
Posts: 397
Joined: Tue 10 May 2005, 06:35
Location: Tijuana, BCN, Mexico

#13 Post by babbs »

yomer,

Is your USB port USB 1.1 or USB 2.0? I experienced what you described when I only had 1.1 ports. Things seemed to take forever, then sometimes didn't work right...

Check out the Trouble Booting USB Keys link in my sig line below. Let us know what you discover.

Babbs

yomer
Posts: 4
Joined: Fri 03 Mar 2006, 10:00

Nope

#14 Post by yomer »

I tried everything, but my problem seems to be something else. It's like if puppy lost access to my usb drive. BTW, i have USB 2.0. My laptop is a Dell Latitude D600

budden
Posts: 26
Joined: Thu 25 Aug 2005, 04:46

USB stick boot -- it works!

#15 Post by budden »

Hoot! After months of tinkering off and on, got it to work.

1. fdisk or similar. format as vfat (what usually comes out of the box) and one partition for the whole stick.

2. mkdosfs (there are a couple different names). if you don't make the file system, you brick-wall (ask me how I know this). it's in /sbin

3. run the USB install script in Puppy (I was using 1.0.8).

For me, step 3 succeeded in copying the files over correctly, but syslinux would run to completion without complaint, but apparently not do anything. If this is happening to you, see step 4.

4. dd in the master boot record. I tried justgreg's MBR above and hosed things up -- no joy. So I looked around for others with similar advice to see if the blanks filled in. The jackpot was here:http://rz-obrian.rz.uni-karlsruhe.de/knoppix-usb/
read to the bottom and download the MBR tagged here and follow the dd syntax.

Cross fingers, reboot. And for me it worked!


(Hardware is a Dell Latitude D600. The hard drive controller has croaked but the rest of the computer is normal; supports USB boot in the BIOS).
Rex Buddenberg

mkeienburg
Posts: 1
Joined: Sun 26 Mar 2006, 18:26

Anyone tried install-mbr?

#16 Post by mkeienburg »

Hi,

I also experienced the problem with a missing MBR on my CF-Card.

1. My solution:
I got around this by starting a Windows XP install on the card (which is attached to an IDE-CF adapter and is configured to be hda.) When the XP install discovered that 128 MB is not sufficient, it aborted. ... Aborted after it had completely restructured the CF with a new partition table and working MBR code. (Not a very clever move from XP to destroy the data on a device that is known to be too small - but I got my MBR.)

2. Another possible solution
which however I have not tried myself, might be the program install-mbr from http://www.chiark.greenend.org.uk/~neilt/ . This should create a working MBR on any device. install-mbr is included in Knoppix for example. The Debian package name is mbr: http://packages.qa.debian.org/m/mbr.html

Since my CF is working like a charm, I don't want to mess around with it. But someone whose bootdevice needs a MBR might try this. If incorporated into Puppy, install-mbr might be convenient alternative to dd'ing the MBR.

I'd like to hear of your experiences.

To budden: As I understand it, syslinux only affects the boot record of a partition. So it is quite normal, that you didn't get an error message after step 3. The boot code in the MBR is executed first and in turn runs the bootcode (created eg by syslinux) of the first active partition it finds. Anyone correct me please, if I got this wrong.

Martin

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#17 Post by JustGreg »

Matin, thanks for the information. I will check the sites. I think that many flash (usb, compact, sd, etc.) devices come without a boot strap loader. Under the Users forum, I did a survey of devices and found that out. The manufacturers do not see them as being used that way. However, there are many ways to one in place. Your use of Windows XP is a new one to me. Windows XP installation process really does not care about the user data present. That is what made me to start looking at Linux, especially Puppy. The end user license agreement (EULA) for Windows XP is very scary. Microsoft errors which effect you are your problems and not theirs.
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

Mikrodots
Posts: 29
Joined: Fri 31 Mar 2006, 19:59
Location: Boston, MA USA
Contact:

#18 Post by Mikrodots »

I'm new to Puppy and Linux in general but I figured I'd throw my initial results up here on the chance they may be helpful.

I've got a SanDisk cruzer micro 256MB that will properly load and run Puppy installed from puppy-1.0.8r1-mozilla.iso CD. I do need to add acpi=off or else it will hang at "PCI: Using configuration type 1" .

For Puppy 2 I also needed to add acpi=off to the syslinux.cfg file and remove vga=785 to get it closer to booting.

Puppy 2 boot now hangs with this error:
Registering unionfs 1.0.14
ERROR, cannot find Puppy on usbflash boot media.
PUPMODE=1 PDEV=
Kernel panic: Attempted to kill init!

My syslunux.cfg file:
default vmlinuz root=/dev/ram0 initrd=initrd.gz acpi=off PMEDIA=usbflash

I used the defaults for all other selections during the USB install.

BTW the PC is a laptop:
Averatec 1000 series laptop
512MB RAM
Pentium M 733 1.1 GHZ
CD DVD CD/RW
1 NTFS partition on 80GB (I am not using the HDD for Puppy)
Laptop touch pad works as ps/2

JustGreg
Posts: 782
Joined: Tue 24 May 2005, 10:55
Location: Connecticut USA

#19 Post by JustGreg »

I am not an expert on this. It sounds like the usb-storage modules are not completely loading and the flash device is not being found during the startup process. Are you seeing any error messages like insmod can not find usb-(some name).o.gz?
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much

Guest

#20 Post by Guest »

I need a design for my website, who can do it?

Post Reply