General TC > General TC Talk
New Boot Drive 16 GB -> 4 GB
MTCAT:
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: ---dd if=/dev/sdd of=/dev/sde conv=noerror,sync status=progress
--- End code ---
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: ---dd if=/dev/sdd of=/dev/sde conv=noerror,sync status=progress
--- End code ---
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: ---dd if=/dev/sdd of=/dev/sde bs=1M count=3700 status=progress
--- End code ---
This worked away and exited fine with equal number of records in and out.
Method C
--- Code: ---dd if=/dev/sdd1 of=/dev/sde1 conv=noerror,sync status=progress
--- End code ---
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
Leee:
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?
MTCAT:
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
MTCAT:
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: ---fdisk -l > disk.txt
--- End code ---
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: ---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
--- End code ---
Thanks,
David
Rich:
Hi MTCAT
I don't know if this will help, but try:
--- Code: ---# 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
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version