OK. I managed to partition my 16GB stick into two partitions. The first partition is 8GB and I made this the active partition. The second partition occupies the remaining space (somewhat less than 8GB). I used the Paragon Hard Disk Manager 15 program to do this and I’m not completely sure what format it used to format the partitions. Probably DOS.
Previously, after the system booted I was unable to see anything in the /dev directory that looked anything like a USB memory stick, but after modifying my build file from this:
display_msg "Starting USB services..."
io-usb -duhci -dohci -dehci -v &
waitfor /dev/io-usb/io-usb 4
waitfor /dev/io-usb/devu-uhci.so 4
waitfor /dev/io-usb/devu-ohci.so 4
waitfor /dev/io-usb/devu-ehci.so 4
to this:
display_msg "Starting USB services..."
io-usb -duhci -dohci -dehci -dxhci -v &
waitfor /dev/io-usb/io-usb 4
waitfor /dev/io-usb/devu-uhci.so 4
waitfor /dev/io-usb/devu-ohci.so 4
waitfor /dev/io-usb/devu-ehci.so 4
waitfor /dev/io-usb/devu-xhci.so 4
I was able to see two new entries in the /dev directory:
/dev/hd0t177
/dev/hd0
I think these represent the two partitions on the USB stick, but which is which? The df command gives unexpected results:
df -P -h
Filesystem Size Used Available Capacity Mounted on
/dev/hd0 256M 256M 0 100% /dev/hd0t177
/dev/hd0 14G 14G 0 100%
Not sure what this is saying. Does hd0 consists of two partitions, one of 256M and one of 14G? That isn’t the way I partitioned it.
Next problem is with fdisk (I thought it might give me some hints as to what is going on). If I do:
fdisk /dev/hd0
I get the response “Error opening terminal: qansi.”.
So I modified my build file to include this:
/usr/lib/terminfo = /usr/lib/terminfo
which I thought would copy the entire terminfo directory (and contents) onto the target’s /usr/lib directory but it doesn’t seem to have worked. Anyone know why?
Any help appreciated.
=============
Bit of an update. It seems df is indeed telling the truth. The problem was that after having partitioned the USB stick I then went and used the Win32DiskImager program to stick a new image onto the USB stick. This overwrites all the existing partitions so you end up with a 256MB partition with the image on it and the rest of the space is unused.
However, if use Paragon Hard Disk Manager 15 to look at the partitions after I have used Win32DiskImager I can then turn the unused space into a DOS formatted partition and give it a volume label of “B”. If I then boot from the USB memory stick I can now see three USB stick related things in /dev:
/dev/hd0
/dev/hd0t12
/dev/hd0t177
If I then do “df -h” I can see that:
/dev/hd0t12 is the 14G partition (which was formatted as DOS using Paragon)
/dev/hd0t177 is the 256M partition (active partition written using Win32DiskManager)
After a bit of fiddling about I find I can mount the 14G partition with “mount -v -t dos /dev/hd0t12 /B” and access it through the “/B” directory.