I am trying to simply format an SD card using gparted. It will be used as a boot disk for a Raspberry PI2
I dismount it, delete the old partitions, and try to create a new partition.
At that point when I press apply, I get a message about how I would have to reboot, something about the operating system needs to know about the device.
The message gives me *2 *choices, ignore or (I think cancel).
What’s with having to reboot ? That’s a pain.
So, is there an easier way to do a simple format of an SD or USB device using the max size, as FAT32, with a label ?
On 2015-05-31 19:26, gogalthorp wrote:
> The reboot would be to auto mount it I’d guess.
Sometimes, when you partition/format a disk, there is an error, and the
kernel still thinks that the disk did not change partition. There is a
command to try make the kernel read it again; if you use fdisk for the
operation, and it detects the error, it will tell you about that command.
If the disk is removable (sata or usb), removing it does the trick.
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)
On 2015-05-31 20:06, gogalthorp wrote:
> Yes but this is gparted.
I know, I know. But there is a command line that tells the kernel to
re-sync the partition table, and I don’t remember it. I know that fdisk,
on the same situation, tells the user to try that command, and if it
The underlying problem is the same, the kernel not knowing that the
partition table of a disk has changed; thus trying to further access it
can write sectors to the wrong locations, which is pretty dangerous.
There has to be an easier way to do this.
If you look at these partitions, when sdf5 is unmounted and I try and unmount sdf6, sdf5 gets re-mounted. When sdf6 is unmounted and I try and unmount sdf5, sdf6 gets remounted.
isnt there a brute force way to format this device ?
Well, erase the partition table (or even the whole disk).
dd if=/dev/zero of= /dev/sdX bs=512 count=1
(where X should of course be replaced with f or what it is, do NOT make an error here!) for the partition table.
Remove the last two parameters about bs and count when you want to zero the whole disk, but that will take some time.
Step 3: Click on the terminal icon in the panel, to open a terminal session
Step 4: su to root
It is your desktop, not “gparted” that is causing those problems.
I remember trying to use “gparted” from the 13.2 rescue CD. The GUI menu entry didn’t work. So I opened a root terminal and typed “gparted”. Lots of partitions were automatically mounted, including partitions on the device where I wanted to change the partitioning.
I logged out, then logged into Icewm. And “gparted” worked smoothly there.
When I have tried “gparted” in KDE, it doesn’t mount partitions but the device notifier annoyingly pops up though that is less of a problem than the automatic mounting.
Want a partitioning solution that works for <everything> no matter what you want to do, whatever formatting, whatever disk layout, whatever OS, whatever <anything>?
Use Gparted live, not the app.
It’ll modify your system and boot partitions directly (the app might require a reboot).
Since it’s a single function tool, you can’t get lost doing something else.
Only requirements are that you need to be able to boot to CDROM or USB where your Gparted live image is, and for the target disk to be accessible.