9

Do these have the same effect when the drive has only one big partition?

udisks --unmount /dev/sdb

udisks --unmount /dev/sdb1
H2ONaCl
  • 10,039

2 Answers2

11

Well --- it depends. Basically, it depends on if the device is partitioned or not (used whole). If it has just one big partition, it's partitioned anyway.

I have a device (a Garmin GPS) that looks like an unpartioned disk, look (from the command mount which shows the mounted devices):

/dev/sdc on /media/romano/GARMIN type vfat (rw,nosuid,nodev,uid=1153,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)

so this disk needs to be unmounted with umount /dev/sdc.

Notice however that this is a bad thing in general, stemming from the age of floppy disks --- if you still have one of those, they were mostly unpartitioned. Devices should be partitioned, even if they have just one big partition. Otherwise a lot of things expecting it will not automount the thing --- it happens randomly on Trusty with my Garmin, too.

A normal disk when mounted look like this:

/dev/sdd1 on /media/romano/I2MTC15_RG type vfat (rw,nosuid,nodev,uid=1153,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)

so it has to be unmounted with umount /dev/sdd1.

Anyway, getting it wrong will just throw an error...

[romano:~] % umount /dev/sdd 
umount: /dev/sdd is not mounted (according to mtab)
Rmano
  • 32,167
2

You can unmount only a partition, not a disk. So it is /dev/sdb1.

You can do it by

umount /dev/sdb1

too.

Pilot6
  • 92,041