[Gllug] Home sweet home

Mark Preston mark at markpreston.co.uk
Tue Dec 29 23:12:24 UTC 2009


John G Walker wrote inter alia:
> First, how do I determine what partitions I have. In particular, I'd
> like to make sure I'm mounting the correct partition. There must be
> commands to list partitions and partition contents, but I've never
> come across them. I can't possibly see how a professional sysadmin
> could work without these.
> 
> Secondly, since I'll end up with a spare partition, is there anything
> useful I could keep there in the long run, once the data has been
> moved? Anything that the collective experience of the list suggests
> would be useful to keep separate as well as /home?
Hi John,
df will show the mounted partitions:
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1            946607648   3393348 895129360   1% /
tmpfs                  1677724         0   1677724   0% /lib/init/rw
varrun                 1677724       128   1677596   1% /var/run
varlock                1677724         0   1677724   0% /var/lock
udev                   1677724       196   1677528   1% /dev
tmpfs                  1677724         0   1677724   0% /dev/shm
lrm                    1677724      2192   1675532
1% /lib/modules/2.6.28-13-g

sudo fdisk -l gives amongst other things:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1      119726   961699063+  83  Linux
/dev/sda2          119727      121601    15060937+   5  Extended
/dev/sda5          120379      121601     9823716   82  Linux swap /
Solaris /dev/sda6          120053      120356     2441817   83  Linux
/dev/sda7          120357      120378      176683+  82  Linux swap /
Solaris /dev/sda8          119727      120030     2441817   83  Linux
/dev/sda9          120031      120052      176683+  82  Linux swap /
Solaris

Partition table entries are not in disk order

Disk /dev/sdb: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000bd67d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        7903    63480816   83  Linux
/dev/sdb2            7904        8390     3911827+  82  Linux swap /
   Solaris /dev/sdb3            8391       48641   323316157+  83  Linux
<End of fdisk -l output>

Thus fdisk -l shows unmounted partitions such as /dev/sdb1

To mount an unmounted partition:
As root 
# mkdir /media/sdb1
then 
# mount /dev/sdb1 /media/sdb1

df will then show that the partition is mounted:
/dev/sdb1             62483396  17687752  41621604  30% /media/sdb1

With the above method you should then be able to browse both your old
and new home partitions with a file manager.
Regards,
Mark

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list