formatting USB stick
-
@huxflux how do I create the sdb1 partition?
-
You could use fdisk.
fdisk /dev/sdb
-
@huxflux Correct me if I am wrong, it has been established this formatting command is not available on the Omega.
-
@Guest
fdisk
is definitely available on the Omega though I haven't had need to use it myself.
If you don't have it on your Omega, do the following:opkg update opkg install fdisk
-
Was intrigued to hear the fdisk was capable of formatting USB stick so decided to try this first thing this morning.
Plugged in 34 GB stick and checked to see what it was seen as under /dev/ directory:ls /dev bus mtd1ro mtdblock3 shm console mtd2 mtdblock4 snd cpu_dma_latency mtd2ro mtdblock5 tty full mtd3 network_latency ttyATH0 i2c-0 mtd3ro network_throughput ttyS0 kmsg mtd4 null uinput log mtd4ro port urandom mem mtd5 ppp watchdog memory_bandwidth mtd5ro ptmx zero mtd0 mtdblock0 pts mtd0ro mtdblock1 random mtd1 mtdblock2 sda
Then ran the fdisk /dev/sda as per @huxflux
fdisk /dev/sda Disk /dev/sda: 32.7 GB, 32717537280 bytes 64 heads, 32 sectors/track, 31201 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Disk /dev/sda doesn't contain a valid partition table
Was something incorrect with my understanding of the command or device ?
-
Hehe, you need to read about fdisk on how to make new partitions
-
@huxflux would you be so kind as to show how this would be done. Reviewed the wrt steps and it was confusing as heck
-
fdisk /dev/sdb
d
<enter> - Delete every other partition you might have with multipled
<enter> - This 'd'eletes your partition(s)n
<enter> - Tell fdisk you want to add a 'n'ew partitionp
<enter> - We'll add a 'p'rimary partition- <enter> x 3 - We want to use all space on the one partition we just added
t
<enter> - In case it didn't choose linux partition 't'ype, lets make sure83
<enter> - The code for linux partition typew
<enter> - 'w'rite the changes to your device
Now you have /dev/sdb1 .. then just run
mkfs.ext4 /dev/sdb1
and afterwardsmount /dev/sdb1 <random directory>
where <random directory> could be /mnt/usbFor fdisk, remember
m
for menu.. hope this works out for you!
-
@huxflux Thank you for taking the time to type the instructions here.
The very first thing I did was type in fdisk -m to duplicate the help you show. Here are the results from doing so:
root@Omega-xxxx:/# fdisk -m fdisk: invalid option -- m BusyBox v1.23.2 (2016-04-29 06:17:20 UTC) multi-call binary. Usage: fdisk [-ul] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK Change partition table -u Start and End are in sectors (instead of cylinders) -l Show partition table for each DISK, then exit -b 2048 (for certain MO disks) use 2048-byte sectors -C CYLINDERS Set number of cylinders/heads/sectors -H HEADS -S SECTORS
It appears the fdisk on the omega is a limited set of the full featured Linux brother?
Decided try some of the other options shown below:root@Omega-xxxx:/# fdisk /dev/sdb -d fdisk: invalid option -- d BusyBox v1.23.2 (2016-04-29 06:17:20 UTC) multi-call binary. Usage: fdisk [-ul] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK Change partition table -u Start and End are in sectors (instead of cylinders) -l Show partition table for each DISK, then exit -b 2048 (for certain MO disks) use 2048-byte sectors -C CYLINDERS Set number of cylinders/heads/sectors -H HEADS -S SECTORS
Am I over complicating this or is the fdisk on the omega a different subset of the linux version?
Again thank you for your input.
-
Ah, you're right, seems like it's a stripped down version of fdisk. You could try
opkg list | grep -i fdisk
and try one of those and see if they're closer to the normal version of fdisk. Remember toopkg update
first.. if you haven't done already