EXT3 File System On A USB Stick
This how-to will create USB memory stick with ext3 file system. First of all, use sudo fdisk -l to get the device handle of USB stick. It might look something like this:
Disk /dev/sdd: 4041 MB, 4041211392 bytes
125 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 7750 * 512 = 3968000 bytes
Disk identifier: 0xddeb26e6
Device Boot Start End Blocks Id System
/dev/sdd1 1 61664 3944719 b W95 FAT32
Now unmount it by typing:
sudo umount /dev/sdd1
Afterwards, format the USB stick using the following code. Remember to spell the USB device properly. This command is quite dangerous, it will erase everything on the drive specified.
sudo mkfs.ext3 /dev/sdd
Now that the USB stick is formatted, a new partition has to be create on it. Type:
sudo fdisk /dev/sdd
to create a partition on the USB stick. This will be the new sdd1 partition. After this is done it has to be formatted again using:
sudo mkfs.ext3 /dev/sdd1
to get the ext3 file system on it.
Now then, label the new ext3 USB stick using the command:
sudo e2label /dev/sdd1 usb_backup
Automatically mounting the USB stick when the server reboots
After the usual backup of the /etc/fstab, edit it to include a new line at end:
/dev/sdd1 /media/usb-backup ext3 user,rw 0 0
Create a new directory ‘usb-backup’ and make it readable and writable by the user:
sudo mkdir /media/usb-backup
sudo chmod 755 /media/usb-backup
Use sudo mount -a to mount the drive.
This USB stick can now act as a backup disk.









