Reformatting Glowlight 3 usb storage
#1  rkjnsn 04-29-2020, 11:46 PM
I recently had my usb storage (the emulated drive that gets exposed to the computer over USB when sideloading content) get corrupted due to a bad USB cable. Somehow, instead of just corrupting the file system, it managed to take the whole partition table with it. While I could have just factory-reset the device, I was hopping to avoid setting everything up again. Fortunately, I had access to a non-corrupted one I could use for reference. Here's what I discovered, in case it's useful for someone in a similar predicament.

The partition table is a standard MBR-style (DOS-style) partition table with a single FAT32 partition. Importantly, the partition must start on sector 1 (immediately after the MBR), otherwise it won't work.

On Linux, I tried to use fdisk, but I couldn't figure out how to force it to start a partition on sector 1 (it wanted to start it on sector 2048), so I ended up using parted. Here are the steps I followed (comments in red, input in blue, output in black):

# parted /dev/sdc
(parted) unit s (this changes the units to sectors)
(parted) mklabel msdos
(parted) print
Model: Linux File-CD Gadget (scsi)
Disk /dev/sdc: 11439113s (this is the size of the disk in sectors)
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
(parted) mkpart primary fat32 1 11439112 (last number is disk size minus one)
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? i
(parted) quit (unlike most tools, parted writes as you go)
Information: You may need to update /etc/fstab.
# mkfs.vfat -n NOOK /dev/sdc1
mkfs.fat 4.1 (2017-01-24)
# sync
# eject /dev/sdc
Note: The disk size was actually slightly different between the two units, so make sure your argument to mkpart reflects the size reported for your device, and don't just blindly copy my numbers.

At this point, I rebooted the Nook and connected it back to my computer. The Nook had automatically created a few files and folders on the filesystem, and I was able to copy all of my books back over from Calibre. When I disconnected, my library was populated with my books once again, and my Nook even remembered where I was in the book I was reading.

Today's Posts | Search this Thread | Login | Register