find / -inum 147649
mkfs
command to set up the filesystem(i.e. mkfs.ext2 /dev/sdb5)mkdir testmount
)mount /dev/sdb5 testmount
)When issuing a mount command at the command line, the mount will only persist until the machine is rebooted. If we always want that particular mount to persist we can put an entry in /etc/fstab
.
/etc/fstab
/dev/sda6 /home/joe/op auto defaults 0 0
Here is a short explanation:
/dev/sda6
- the device we are going to mount/home/joe/op
- the mount pointauto
- automatically detect what type fs this is (ext3 or ext4 for example)defaults
- options associated with mount0 0
- advanced, usually these are always 0.Ubuntu now uses UUID to identify partitions. To find out what the UUID is for a particular device we can use:
sudo blkid
Why use a UUID instead of /dev/sda1 to identify the device? Say that that you plugged another disk into your computer and booted up. It probably won't happen, but it is possible that the new disk might be identified as /dev/sda, causing the system to look for the contents of /boot on the first partition of that disk.
The information about how a hard disk has been partitioned is stored in its first sector (that is, the first sector of the first track on the first disk surface). The first sector is the master boot record (MBR) of the disk; this is the sector that the BIOS reads in and starts when the machine is first booted. The master boot record contains a small program that reads the partition table, checks which partition is active (that is, marked bootable), and reads the first sector of that partition, the partition's boot sector (the MBR is also a boot sector, but it has a special status and therefore a special name). This boot sector contains another small program that reads the first part of the operating system stored on that partition (assuming it is bootable), and then starts it.
We have been examining how partitioning has been done using the MBR. To see if we are in-fact using the MBR partitioning scheme we can do a sudo parted -l
. If we see the ms-dos
partition table this is what we are using. MBR only supports addressing 2TB
There are new and better alternatives to using the MBR partition table such as the GUID partition table (GPT).
Unified Extensible Firmware Interface
Unlike BIOS, UEFI does not rely on a boot sector, defining instead a boot manager as part of the UEFI specification. When a computer is powered on, the boot manager checks the boot configuration and, based on its settings, loads and executes the specified operating system loader or operating system kernel. The boot configuration is a set of global-scope variables stored in NVRAM, including the boot variables that indicate the paths to operating system loaders or kernels, which as a component class of UEFI applications are stored as files on the firmware-accessible EFI system partition (Wikipedia)