Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 01 Oct 2014, 18:22
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Puppy2 Installer and USB tests; a bit long
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Author Message
JustGreg

Joined: 24 May 2005
Posts: 683
Location: Connecticut USA

PostPosted: Sat 25 Feb 2006, 23:29    Post_subject:  Puppy2 Installer and USB tests; a bit long  

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
sys-nopart.mbr.gz
Description  file in gzip format
gz

 Download 
Filename  sys-nopart.mbr.gz 
Filesize  241 Bytes 
Downloaded  681 Time(s) 
Back to top
View user's profile Send_private_message 
JustGreg

Joined: 24 May 2005
Posts: 683
Location: Connecticut USA

PostPosted: Sat 25 Feb 2006, 23:45    Post_subject:  

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
sys-nopart.mbr.gz
Description  File will be placed in /root/my-mbr
gz

 Download 
Filename  sys-nopart.mbr.gz 
Filesize  241 Bytes 
Downloaded  615 Time(s) 

_________________
Enjoy life, Just Greg
Live Well, Laugh Often, Love Much
Back to top
View user's profile Send_private_message 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Sun 26 Feb 2006, 00:15    Post_subject:  

Great testing report Smile

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 WIKI
Back to top
View user's profile Send_private_message Visit_website 
babbs


Joined: 10 May 2005
Posts: 397
Location: Running down a highway in Virginia, USA.

PostPosted: Sun 26 Feb 2006, 01:37    Post_subject: Re: Puppy2 Installer and USB tests; a bit long  

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

_________________
Registered Linux User 371182 ( http://counter.li.org/ )
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Sun 26 Feb 2006, 08:56    Post_subject:  

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!
Back to top
View user's profile Send_private_message Visit_website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Sun 26 Feb 2006, 09:50    Post_subject:  

Have sent John Murga a PM (I am also having problems) about the forum
_________________
Puppy WIKI
Back to top
View user's profile Send_private_message Visit_website 
JustGreg

Joined: 24 May 2005
Posts: 683
Location: Connecticut USA

PostPosted: Sun 26 Feb 2006, 13:03    Post_subject:  

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.
Back to top
View user's profile Send_private_message 
babbs


Joined: 10 May 2005
Posts: 397
Location: Running down a highway in Virginia, USA.

PostPosted: Sun 26 Feb 2006, 13:19    Post_subject:  

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. Smile
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?

_________________
Registered Linux User 371182 ( http://counter.li.org/ )
Back to top
View user's profile Send_private_message 
JustGreg

Joined: 24 May 2005
Posts: 683
Location: Connecticut USA

PostPosted: Sun 26 Feb 2006, 16:21    Post_subject:  

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
Back to top
View user's profile Send_private_message 
babbs


Joined: 10 May 2005
Posts: 397
Location: Running down a highway in Virginia, USA.

PostPosted: Sun 26 Feb 2006, 21:25    Post_subject:  

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:
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

_________________
Registered Linux User 371182 ( http://counter.li.org/ )
Back to top
View user's profile Send_private_message 
JustGreg

Joined: 24 May 2005
Posts: 683
Location: Connecticut USA

PostPosted: Sun 26 Feb 2006, 21:59    Post_subject:  

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
Back to top
View user's profile Send_private_message 
yomer

Joined: 03 Mar 2006
Posts: 4

PostPosted: Fri 03 Mar 2006, 06:10    Post_subject: Plz help with cruzer micro  

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?
Back to top
View user's profile Send_private_message 
babbs


Joined: 10 May 2005
Posts: 397
Location: Running down a highway in Virginia, USA.

PostPosted: Fri 03 Mar 2006, 09:54    Post_subject:  

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

_________________
Registered Linux User 371182 ( http://counter.li.org/ )
Back to top
View user's profile Send_private_message 
yomer

Joined: 03 Mar 2006
Posts: 4

PostPosted: Fri 03 Mar 2006, 16:17    Post_subject: Nope  

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
Back to top
View user's profile Send_private_message 
budden

Joined: 25 Aug 2005
Posts: 26

PostPosted: Sun 05 Mar 2006, 20:48    Post_subject: USB stick boot -- it works!  

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.Cool.

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
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 2 Posts_count   Goto page: 1, 2 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1081s ][ Queries: 13 (0.0043s) ][ GZIP on ]