WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: New Boot Drive 16 GB -> 4 GB  (Read 517 times)

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 406
New Boot Drive 16 GB -> 4 GB
« on: February 05, 2026, 01:28:41 PM »
Hi everyone,

I've been booting my TC 3.8.4 setup off 16 GB pen drives, I've successfully been able to make more clones of my original 16 GB pen drive, with dd, as long as it's onto another 16 GB drive.

If sdd is the "source" or original drive, and sde the new copy, I did

Code: [Select]
dd if=/dev/sdd of=/dev/sde conv=noerror,sync status=progress

And this has worked great, as long as it's 16 GB to 16 GB type of operation.

I have an expensive 4 GB industrial grade pen drive that I would like to use if possible but I haven't so far been able to get my system to boot up with the 4 GB pen drive.

Here's what I've tried so far;

1) I made a second copy of my original 16 GB pen drive, onto another 16 GB pen drive, with dd, as above.
2) I took that second copied 16 GB pen drive and shrank the partition (with gParted) to 3.7 GB.
3) I then tried various incarnations of "dd" after step (2) using the shrunk partition 16 GB drive copying onto the 4 GB drive but I haven't been able to get the 4 GB drive to boot, I get a "Boot error" right after the USB controllers get initialized and the BIOS is detecting USB devices. My son did film the boot up at 60 fps and I can see that the pen drive was recognized and configured (Cactus FlashCard *HiSpeed*), but right after that, I get "Boot error".

However, with my TC 3.8.4 booted up off a 16 GB pen drive, I can plug in and mount the 4GB drive and all seems well in that I can see the copied files on the 4 GB drive, dmesg output looks reasonable as pertains to the 4 GB drive, df returns 30 percent usage, etc.

I have also confirmed that I can boot up off the second copied 16 GB drive with the shrunk partition, so it should be an okay starting point (I hope) with which to make a 4 GB boot pen drive(?).

Here's the various things I've tried with dd.

Method A

Code: [Select]
dd if=/dev/sdd of=/dev/sde conv=noerror,sync status=progress

This worked away until we got to the 4 GB limit of sde, then dd complained of no space left on sde, and stopped, gracefully though, with a one record discrepancy at the end.

Method B

Code: [Select]
dd if=/dev/sdd of=/dev/sde bs=1M count=3700 status=progress

This worked away and exited fine with equal number of records in and out.

Method C

Code: [Select]
dd if=/dev/sdd1 of=/dev/sde1 conv=noerror,sync status=progress

This also worked fine in the sense that it didn't have any errors, but not sure that this even copied the boot sector?

But, in all cases, I get a "Boot error" when trying to boot up with the 4 GB pen drive.

I also tried writing all zeros to the 4 GB pen drive and then re-did Method A but still had the same result, "Boot error".

Appreciate any help or advice, I do have more industrial grade 16 GB drives on the way but will be another 6 weeks, would ideally get this 4 GB drive going in the meantime, not sure what to try next with the quest to make use of this expensive 4 GB pen drive.

Thanks,

David

    [Edit]: Fixed code tag.  Rich
« Last Edit: February 06, 2026, 10:14:25 PM by Rich »

Offline Leee

  • Full Member
  • ***
  • Posts: 200
Re: New Boot Drive 16 GB -> 4 GB
« Reply #1 on: February 05, 2026, 03:26:48 PM »
Hi MTCAT,

I'm not sure dd is the right tool for the job  - though I'm certainly not sure that it's -not-.

Typically, I would suggest doing a reinstall from scratch on the new USB stick and then copying over your data and any custom extensions from the original stick... BUT, of course, using 3.8.4 makes that "interesting" since 3.x has been archived off of the repo.

While I, personally, used 4.x long past its official currency, though not for any particular reason, I never really missed it once I moved on.  Is there anything that binds you to 3.x?  Also - and again, just out of curiosity - what is "industrial grade" about the new 4GB pen drive?

Meanwhile a couple of things  to note:

- Regardless of partition sizes, using dd at the device level (ie: sdd to sde) will try to copy the entire 16 GB of sde onto sdd - which will fail when it overruns the capacity of sdd.  The result might still -work- as a boot device (or not) but it seems dangerous to have any sort of uncertainty about one's boot partition.


- using dd to copy a partition (ie: sdd1 to sde1) will not copy any boot loader code that exists on sdd in the area before where the partitions start.

I would suggest maybe just prepare the 4 GB boot stick - partition it, format it, mount it, install the boot loader.  Then use regular file copy to bring the relevant files over from the 16 GB stick.

BTW, what boot loader are you using?
core 16.0 x86_64

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 406
Re: New Boot Drive 16 GB -> 4 GB
« Reply #2 on: February 05, 2026, 04:33:00 PM »
Hi Leee,

Nice to meet you and thanks for the help, I'm stuck with 3.8.4 (kernel 2.6.33) to maintain compatibility with the Analog-digital converter drivers used in a big C acquisition program. Newer version drivers are available for the ADC, but that would then require a re-write of the big C acquisition program to properly use the new driver calls, I'm not a C programmer, I've done mainly scientific programming (data processing) in Fortran! So, I'm trying to avoid re-coding the big acquisition program since for me, that would be next to impossible.

I would never have gotten as far as I have w/o the help of the forum, especially Rich, Juanito and many others.

So now I want to replicate the one existing system I have got working, and build one, or maybe two or three more.

The "Industrial Grade" pen drive has a wider -40 to +85 C temperature range but arguably more importantly is supposed to be very durable with many more writes/re-writes possible as opposed to a regular pen drive, supposedly anyway. Many are specified in terms of "writes per day", like can write the entire volume of the drive x number of times per day for 5 years before any errors occur. I'm using mainly "Cactus Technologies" pen drives (16 GB - 300 series, trying to use 4 GB - 100 series) but also have some "cheaper" SwissBit 16 GB drives, although those are "MLC" (multi-layer), the "Cactus" drives are SLC (single-layer).

The "manual" installation onto the 4 GB drive might be good, I would just need to learn how to install the boot loader (SYSLINUX) by itself, and then go from there I guess.

Thanks,

David


Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 406
Re: New Boot Drive 16 GB -> 4 GB
« Reply #3 on: February 05, 2026, 05:09:35 PM »
Hi everyone,

May have found a clue as to the problem with the 4 GB Cactus pen drive I'm trying to boot off.

I booted up my little system with my 16 GB "SwissBit" pen drive, this is sdb1.

Then I inserted and mounted the 4 GB "Cactus" pen drive, this is sdc1 (which does not boot  up).

Then I inserted and mounted the copied 16 GB "SwissBit" drive on which I used gParted to reduce partition to 3.7 GB, this is sdd1 (which does boot up).

Then I did;

Code: [Select]
fdisk -l > disk.txt

Attached disk.txt here, can see some strange things with sdc1, so this is the reason for the non-booting maybe, how to fix this though?

Code: [Select]
Disk /dev/sda: 128.0 GB, 128043712512 bytes
255 heads, 63 sectors/track, 15567 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda2              11       15568   124955648   5 Extended
/dev/sda5              11       15568   124954624  83 Linux

Disk /dev/sdb: 16.0 GB, 16039018496 bytes
64 heads, 32 sectors/track, 15296 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1   *           1       14664    15015920  83 Linux

Disk /dev/sdc: 4009 MB, 4009754624 bytes
207 heads, 55 sectors/track, 687 cylinders
Units = cylinders of 11385 * 512 = 5829120 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdc1   *           1         666     3789808  83 Linux
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 1, 1) logical=(0, 0, 33)
Partition 1 has different physical/logical endings:
     phys=(471, 206, 55) logical=(665, 156, 43)

Disk /dev/sdd: 16.0 GB, 16039018496 bytes
207 heads, 55 sectors/track, 2751 cylinders
Units = cylinders of 11385 * 512 = 5829120 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdd1   *           1         666     3789808  83 Linux



Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12553
Re: New Boot Drive 16 GB -> 4 GB
« Reply #4 on: February 05, 2026, 09:54:17 PM »
Hi MTCAT
I don't know if this will help, but try:
Code: [Select]
# Expand partition 1 to the end of the file.
tc@E310:~$ sudo parted -s /dev/sdc resizepart 1 100%

# This must be done before expanding the filesystem to inform the kernel the MBR changed.
tc@E310:~$ e2fsck -f /dev/sdc1

# Finally, we expand the filesystem.
tc@E310:~$ resize2fs -p /dev/sdc1

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 824
Re: New Boot Drive 16 GB -> 4 GB
« Reply #5 on: February 06, 2026, 02:29:22 AM »
Attached disk.txt here, can see some strange things with sdc1, so this is the reason for the non-booting maybe, how to fix this though?

Code: [Select]
Disk /dev/sda: 128.0 GB, 128043712512 bytes
255 heads, 63 sectors/track, 15567 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda2              11       15568   124955648   5 Extended
/dev/sda5              11       15568   124954624  83 Linux

Disk /dev/sdb: 16.0 GB, 16039018496 bytes
64 heads, 32 sectors/track, 15296 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1   *           1       14664    15015920  83 Linux

Disk /dev/sdc: 4009 MB, 4009754624 bytes
207 heads, 55 sectors/track, 687 cylinders
Units = cylinders of 11385 * 512 = 5829120 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdc1   *           1         666     3789808  83 Linux
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(0, 1, 1) logical=(0, 0, 33)
Partition 1 has different physical/logical endings:
     phys=(471, 206, 55) logical=(665, 156, 43)

Disk /dev/sdd: 16.0 GB, 16039018496 bytes
207 heads, 55 sectors/track, 2751 cylinders
Units = cylinders of 11385 * 512 = 5829120 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdd1   *           1         666     3789808  83 Linux


  • Open the device: Start fdisk for the specific drive (replace /dev/sdX with your actual device name, e.g., /dev/sda) with root privileges:
    sudo fdisk /dev/sdX
  • Use the toggle command: Press the a key. This is the command to "toggle a bootable flag".
  • Select the partition: Enter the number of the partition you want to make bootable (e.g., 1 for the first partition).
  • Verify the change: Press p to print the partition table. An asterisk (*) should now appear under the "Boot" column for your chosen partition.
  • Save and exit: Type w to write the changes to the disk and exit the program.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12553
Re: New Boot Drive 16 GB -> 4 GB
« Reply #6 on: February 06, 2026, 10:05:18 AM »
Hi patrikg
/dev/sdc is the device he's having problems with. fdisk shows
the bootable flag is already set for partition 1. Won't your
instructions turn the bootable flag off for partition 1?

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 406
Re: New Boot Drive 16 GB -> 4 GB
« Reply #7 on: February 06, 2026, 11:02:55 AM »
Hi Rich and patrikg,

I haven't tried pattrikg's suggestion yet since, as Rich says, sdc1 already does have the asterisk there, but keeping that as a "plan-B" for sure, if all else fails could maybe try turning that off and then back on?

But anyway, I tried your commands Rich, and they did help as shown below, but I still get a "Boot error" (from SYSLinux I assume).

Does it matter that the ending point of sdc1 (non booting 4 GB drive) and sdd1 (16 GB shrunk to 3.7 GB drive that does boot) are different, could that be the issue still?

Code: [Select]

Disk /dev/sda: 128.0 GB, 128043712512 bytes
255 heads, 63 sectors/track, 15567 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda2              11       15568   124955648   5 Extended
/dev/sda5              11       15568   124954624  83 Linux

Disk /dev/sdb: 16.0 GB, 16039018496 bytes
64 heads, 32 sectors/track, 15296 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdb1   *           1       14664    15015920  83 Linux

Disk /dev/sdc: 4009 MB, 4009754624 bytes
126 heads, 22 sectors/track, 2825 cylinders
Units = cylinders of 2772 * 512 = 1419264 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdc1   *           1        2826     3915760  83 Linux

Disk /dev/sdd: 16.0 GB, 16039018496 bytes
207 heads, 55 sectors/track, 2751 cylinders
Units = cylinders of 11385 * 512 = 5829120 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sdd1   *           1         666     3789808  83 Linux


Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 406
Re: New Boot Drive 16 GB -> 4 GB
« Reply #8 on: February 06, 2026, 11:34:38 AM »
Hi Rich,

Sorry, ignore my last question, I can see now what your commands did to expand partition 1 on sdc to all the cylinders, not sure why it still won't boot off the 4 GB drive, could try patrikg's suggestion maybe?, otherwise may have to just wait for the 16 GB Cactus drives to show up in 6 weeks

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 406
Re: New Boot Drive 16 GB -> 4 GB
« Reply #9 on: February 06, 2026, 04:07:01 PM »
Hi Rich and patrikg,

Tried patrikg's suggestion and toggled the boot flag off, and then back on, this didn't help unfortunately.

I was able to rebuild my old original 16 GB SanDisk drive (with dd) and I guess I'll just work off that until the fancy ones show up, for some reason the slightly less fancy (compared to Cactus) SwissBit 16 GB drives do work fine in that they do boot up, and work fine otherwise, but they seem to have problems with certain other USB devices (temperature sensor, USB keyboard) which crash the computer. Which was another reason why I wanted to get the 4 GB USB2.0 Cactus pen drive going. The only other USB device I can plug in so far when using the SwissBit drives w/o crashing is a USB2.0 pen drive, so that would work for me, barely, if I used a different temp sensor (not USB) and a serial keyboard. I was originally using a roll up serial keyboard, which works, but was hoping to switch over to a mini wired USB keyboard since the roll up one is "floppy" and kind of hard to type on, but may have to stick with the serial keyboard.

I also tried a wireless keyboard/mouse (USB dongle) which I had high hopes for, it works, but when I run the acquisition program, it's VERY VERY laggy (slow to update), so it seems to be unreliable under heavier CPU load, such that it's not workable for me, unless something could modified to make it work better.

Crazy how things you think are small changes (for the better) end up being BIG changes that can't be done or are for the worse.

I thought the USB keyboard was a power issue since the SwissBit drives are USB3.0 compatible (my VortexDX3 ports, can supply 500 mA max on each of 4 ports), but the temp sensor draws only 1 mA (supposedly) and the USB keyboard I wired it to draw it's power from an external source (hooked up data lines only to USB port) and it still caused issues, so...

I may have to use an external temperature sensor, like an aquarium temp sensor ( :( ) and avoid a possible USB conflict, and my roll up serial keyboard, and leave it at that, seems a bit depressing to have to do that, but oh well, see what happens, simpler is better I suppose...wish that wireless keyboard/mouse would have worked.

Thanks for letting me talk.

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 406
Re: New Boot Drive 16 GB -> 4 GB
« Reply #10 on: February 06, 2026, 04:15:55 PM »
And of course, thanks for all the help.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 12553
Re: New Boot Drive 16 GB -> 4 GB
« Reply #11 on: February 06, 2026, 10:48:57 PM »
Hi MTCAT
I'd like you to try something. Try plugging the 4 Gig USB
drive into a desktop or laptop computer and see if it tries
to boot on it.

I'm wondering if maybe the USB 4 Gig device is fine, but
your hardware just doesn't like it for some reason.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 406
Re: New Boot Drive 16 GB -> 4 GB
« Reply #12 on: February 07, 2026, 11:33:39 AM »
Hi Rich,

Strangely, my old ASUS laptop (2.6.21 kernel) wasn't working off any external drives (for booting) and my "newer" Panasonic Toughbooks (WinXP) don't allow me to select a USB removable drive for booting, only options being Floppy, HDD or CD.

But my wife's old Sony VAIO (Win Vista) did have an external boot option, so I was finally able to get a reliable external boot test with that, the 4G Cactus pen drive did not boot though, once again getting a SYSLINUX "Boot error", I was able to boot up an old non-real time TinyCore 3.8.4 though on my wife's old Sony VAIO off an old SanDisk pen drive, so that did work, even had your little "tinierclock.sh" going!, although the time was wrong since the GPS wasn't connected.

So I don't know what the problem is with this 4G Cactus drive, I used dd to make a direct copy from another (shrunk partition) drive, which does boot, so should be a good place to start from, then you helped me fix the partition table on the 4G Cactus drive, we made sure that the boot flag is on, so why won't it boot?, weird.

Thanks,

David








Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 406
Re: New Boot Drive 16 GB -> 4 GB
« Reply #13 on: February 07, 2026, 11:52:45 AM »
Hi Rich,

Update, I was able to get my Panasonic Toughbooks to boot off external drives, just had to play around in the BIOS a bit more, but was the same result, 4G Cactus drive "Boot error", but old non real-time TC 3.8.4 was able to boot up.

Scary thought maybe, could SYSLINUX be re-installed on the 4G Cactus drive w/o messing up the rest of 4G drive?

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 406
Re: New Boot Drive 16 GB -> 4 GB
« Reply #14 on: February 07, 2026, 12:15:04 PM »
Hi Rich,

Correction, it's actually extlinux I'm using (SYSLINUX for ext4) since it's an extlinux.cfg file that has all the boot options in it.

Thanks,

David