Reformat USB Device to EXT4
If you’re using a RHEL machine and need to view USB external devices, you might need to reformat the USB device to the EXT4 file system. In this blog post, we will guide you through the process. Let’s get started!
Reformatting the USB Device
- Obtain a copy of the latest Linux Rescue disk.
- You can down the Linux Resuce Disk from here.
- Boot from the Linux Rescue disk.
- Select the option that states “directly start the graphical environment”.
- Click the GParted tool at the bottom left of the screen.
- On the top right of the GParted screen, click the dropdown menu and select the external USB device (
/dev/sdb
). - Delete all partitions on the external USB device, then click the green checkbox at the top.
- Click Apply/Close.
- Right-click on unallocated space, click New, set the Filesystem to
ext4
, and click the green checkbox. Then click Apply.
Mounting the USB Device on a RHEL Machine
- Run the following command to remove all
usb-storage
modules from the kernel:modprobe -r usb-storage
- Run the following command to install all usb-storage modules to the kernel:
modprobe -i usb-storage
- Run the following command to read all messages in the kernel and look for the /dev/sdb1 device:
dmesg
- Run the following command to mount the USB device to the /media directory:
mount /dev/sdb1 /media
- Ensure that the necessary mount point is mounted on the machine via /etc/fstab. Open the /etc/fstab file using a text editor:
/etc/fstab
Add the following line to the file :
/dev/sdb1 /media ext4 defaults 0 0
Congratulations! You have successfully reformatted the USB device to the EXT4 file system and mounted it on your RHEL machine. Now you can access and use the USB external device as needed.