Puppy bootable stick to larger stick

Using applications, configuring, problems
Post Reply
Message
Author
rrolsbe
Posts: 185
Joined: Wed 15 Nov 2006, 21:53

Puppy bootable stick to larger stick

#1 Post by rrolsbe »

Ok experts what am I forgetting.

I have an existing 4G Kangaru (Bootable) Stick that I created with Puppy's 5.11 universal installer that is running out of room. I did NOT reformat the original 4G stick (it has the original FAT32 partition). I purchased an 8GB Kangaru stick to get some expansion room.

Follows are the steps I have performed so far but the new 8GB stick still will not boot:

I copied all the files from the 4G stick to the new 8G stick.

Then I used fdisk to toggle the boot flag on the 8G stick.

Then I dd the first 446 bytes from the 4G stick to the 8G stick with the this command:

Code: Select all

dd bs=446 if=/dev/sda of=/dev/sdb count=1
The command above did NOT overwrite the partition table on the 8GB stick.

Code: Select all

df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 3.8G 2.6G 1.2G 69% /initrd/mnt/dev_sav
/dev/sdb1 7.5G 3.4G 4.1G 46% /mnt/sdb1

Note: I copied three additional large files to the sdb1 partition so the "Used" sizes do not match.

I thought the DOS boot information was located in the first 446 bytes of the first sector?

What else does the Puppy installer scripts do to make a USB stick bootable? I suspect it has something to to with the ldlinux.sys file? The file copy (at the file system level) most certainly did not place the ldlinux.sys file in the same sectors as the original.

Is there a syslinux script that I can run to fix this or do I need to start over?

Maybe I should have originally issued dd /dev/sda to /dev/sdb then expanded the partition to use the remaining area of the larger flash drive using Gparted???


Output of fdisk follows.

Code: Select all

fdisk -lu
Disk /dev/sda: 4009 MB, 4009754624 bytes
23 heads, 23 sectors/track, 14804 cylinders, total 7831552 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 8064 7831551 3911744 c W95 FAT32 (LBA)

Disk /dev/sdb: 8011 MB, 8011120640 bytes
64 heads, 62 sectors/track, 3943 cylinders, total 15646720 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 8064 15646719 7819328 c W95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary.

Thanks Much In Advance for any help!!
Regards, Ron

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

Re: Puppy bootable stick to larger stick

#2 Post by rcrsn51 »

rrolsbe wrote:Is there a syslinux script that I can run to fix this or do I need to start over?

Code: Select all

syslinux /dev/sdb1

rrolsbe
Posts: 185
Joined: Wed 15 Nov 2006, 21:53

Re: Puppy bootable stick to larger stick

#3 Post by rrolsbe »

rcrsn51 wrote:
rrolsbe wrote:Is there a syslinux script that I can run to fix this or do I need to start over?

Code: Select all

syslinux /dev/sdb1
Thanks!

I performed a dd from 4G to 8G but resizing is problematic. The newer versions of Linux contain a Gparted version that crashes on some devices that have FAT32 partitions. I resized the FAT32 partition with using Puppy 4.11/Gparted but the start of the partition changed from 8064 to 7xxx something. So the device has no valid partition, need to reformat, run syslinux command then copy all files EXCEPT ldlinux.sys to larger 8GB flash drive. BTW--- This DID work!

Should have waited for your post reply!

Regards, Ron

I believe one of things the command syslinux /dev/sdxx does is copy the following into the first sector of the partition. Of course, I did NOT do this in my original attempt before posting my question. I think it might have worked if I had used dd to copy the 1st sector of 4G sticks partition to the 1st sector of the 8GB stick partition.?

Code: Select all

dd bs=512 count=1 if=/dev/sdb1 | hexdump -Cv
00000000 eb 58 90 53 59 53 4c 49 4e 55 58 00 02 08 20 00 |.X.SYSLINUX... .|
00000010 02 00 00 00 00 f8 00 00 3e 00 f7 00 00 00 00 00 |........>.......|
00000020 80 a0 ee 00 8b 3b 00 00 00 00 00 00 02 00 00 00 |.....;..........|
00000030 01 00 06 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000040 00 00 29 94 82 21 37 20 20 20 20 20 20 20 20 20 |..)..!7 |
00000050 20 20 46 41 54 33 32 20 20 20 fa fc 31 c9 8e d1 | FAT32 ..1...|
00000060 bc 76 7b 52 06 57 1e 56 8e c1 b1 26 bf 78 7b f3 |.v{R.W.V...&.x{.|
00000070 a5 8e d9 bb 78 00 0f b4 37 0f a0 56 20 d2 78 1b |....x...7..V .x.|
00000080 31 c0 b1 06 89 3f 89 47 02 f3 64 a5 8a 0e 18 7c |1....?.G..d....||
00000090 88 4d bc 50 50 50 50 cd 13 eb 5c 8b 55 aa 8b 75 |.M.PPPP...\.U..u|
000000a0 a8 c1 ee 04 01 f2 81 fa b7 07 73 2b f6 45 b4 7f |..........s+.E..|
000000b0 75 25 38 4d b8 74 20 66 3d 21 47 50 54 75 10 80 |u%8M.t f=!GPTu..|
000000c0 7d b8 ed 75 0a 66 ff 75 ec 66 ff 75 e8 eb 0f 51 |}..u.f.u.f.u...Q|
000000d0 51 66 ff 75 bc eb 07 51 51 66 ff 36 1c 7c b4 08 |Qf.u...QQf.6.|..|
000000e0 cd 13 72 13 20 e4 75 0f c1 ea 08 42 89 16 1a 7c |..r. .u....B...||
000000f0 83 e1 3f 89 0e 18 7c fb bb aa 55 b4 41 8a 16 74 |..?...|...U.A..t|
00000100 7b cd 13 72 10 81 fb 55 aa 75 0a f6 c1 01 74 05 |{..r...U.u....t.|
00000110 c6 06 45 7d 00 66 b8 3e 77 00 00 66 ba 00 00 00 |..E}.f.>w..f....|
00000120 00 bb 00 7e e8 10 00 66 81 3e 24 7e d4 ff 73 72 |...~...f.>$~..sr|
00000130 75 76 ea 38 7e 00 00 66 03 06 60 7b 66 13 16 64 |uv.8~..f..`{f..d|
00000140 7b b9 10 00 eb 2b 66 52 66 50 06 53 6a 01 6a 10 |{....+fRfP.Sj.j.|
00000150 89 e6 66 60 b4 42 e8 7f 00 66 61 8d 64 10 72 01 |..f`.B...fa.d.r.|
00000160 c3 66 60 31 c0 e8 70 00 66 61 e2 da c6 06 45 7d |.f`1..p.fa....E}|
00000170 2b 66 60 66 0f b7 36 18 7c 66 0f b7 3e 1a 7c 66 |+f`f..6.|f..>.|f|
00000180 f7 f6 31 c9 87 ca 66 f7 f7 66 3d ff 03 00 00 77 |..1...f..f=....w|
00000190 17 c0 e4 06 41 08 e1 88 c5 88 d6 b8 01 02 e8 37 |....A..........7|
000001a0 00 66 61 72 01 c3 e2 c9 31 f6 8e d6 bc 68 7b 8e |.far....1....h{.|
000001b0 de 66 8f 06 78 00 be df 7d e8 09 00 31 c0 00 16 |.f..x...}...1...|
000001c0 cd 19 f4 eb fd 66 60 ac 20 c0 74 09 b4 0e bb 07 |.....f`. .t.....|
000001d0 00 cd 10 eb f2 66 61 c3 8a 16 74 7b cd 13 c3 42 |.....fa...t{...B|
000001e0 6f 6f 74 20 65 72 72 6f 72 0d 0a 00 00 00 00 00 |oot error.......|
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200

The alignment above is not perfect but it shows the content of the first 512 byte sector of the 1st partition sdb1 is this case.

Can the hexdump code shown above find the ldlinux.sys file in the file system or does the syslinux /dev/sdxx command place the ldlinux.sys content in know sectors? and if you copied/moved the ldlinux.sys file to different sectors it might not be able to find it?
Last edited by rrolsbe on Tue 14 Aug 2012, 14:24, edited 1 time in total.

User avatar
dk60902
Posts: 230
Joined: Sun 26 Sep 2010, 22:34
Location: In front of my computer

Re: Puppy bootable stick to larger stick

#4 Post by dk60902 »

rrolsbe wrote:Ok experts what am I forgetting.

I have an existing 4G Kangaru (Bootable) Stick that I created with Puppy's 5.11 universal installer that is running out of room. I did NOT reformat the original 4G stick (it has the original FAT32 partition). I purchased an 8GB Kangaru stick to get some expansion room.

Follows are the steps I have performed so far but the new 8GB stick still will not boot:

I copied all the files from the 4G stick to the new 8G stick.

Then I used fdisk to toggle the boot flag on the 8G stick.

Then I dd the first 446 bytes from the 4G stick to the 8G stick with the this command:

Code: Select all

dd bs=446 if=/dev/sda of=/dev/sdb count=1
The command above did NOT overwrite the partition table on the 8GB stick.

Code: Select all

df -kh
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 3.8G 2.6G 1.2G 69% /initrd/mnt/dev_sav
/dev/sdb1 7.5G 3.4G 4.1G 46% /mnt/sdb1

Note: I copied three additional large files to the sdb1 partition so the "Used" sizes do not match.

I thought the DOS boot information was located in the first 446 bytes of the first sector?

What else does the Puppy installer scripts do to make a USB stick bootable? I suspect it has something to to with the ldlinux.sys file? The file copy (at the file system level) most certainly did not place the ldlinux.sys file in the same sectors as the original.

Is there a syslinux script that I can run to fix this or do I need to start over?

Maybe I should have originally issued dd /dev/sda to /dev/sdb then expanded the partition to use the remaining area of the larger flash drive using Gparted???


Output of fdisk follows.

Code: Select all

fdisk -lu
Disk /dev/sda: 4009 MB, 4009754624 bytes
23 heads, 23 sectors/track, 14804 cylinders, total 7831552 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 8064 7831551 3911744 c W95 FAT32 (LBA)

Disk /dev/sdb: 8011 MB, 8011120640 bytes
64 heads, 62 sectors/track, 3943 cylinders, total 15646720 sectors
Units = sectors of 1 * 512 = 512 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 * 8064 15646719 7819328 c W95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary.

Thanks Much In Advance for any help!!
Regards, Ron
Do you have a frugal install on your 4 GB stick? If so, here's what I'd do. I prefer a manual install rather than using the universal installer.

Boot up 5.1.1 from 4 GB stick.

Run GParted, create partition table on 8 GB stick. Format one partition to fat32 or ext4. You can create optio nal swap partition (1.5 X RAM on your computer. Then, make sure 1st partition is bootable by right clicking partition, select "manage flags", and ticking "boot". Copy the puppy 5.1.1 sfs file, vmlinuz, initrd and savefile from your 4 GB drive. Run grub4dos. Your 8 GB should be able to boot up now.
HP Pavilion Mini Pentium 1.7 GHz Dual Core 12 GB RAM 120 GB SSD Linux Lite 3.8 64-bit w/ Kensington Slimblade Trackball
Bionic8.0 Xenial64 Tahr64 USB frugal install
Samsung Chromebook Plus
LG V20 LG Xpression Plus Huawei Ascend XT2

Post Reply