#3: This is the correct response: "Command (m for help):". You would then type "m" for the list of commands, and use this program to delete and create partitions among other things. The instructions to do "x" will bring up the "Advanced" options, and then "f" will correct the partition number sequence. DON'T DELETE sdb1 until you have saved the files using step #2.
A little basics about how partitioning and file systems work using Linux (when you use Windows, all of this is done, just without you knowing it or having any control over it):
When you split up the space on a drive, that is called a partition. A partition cannot be accessed directly because the system doesn't know how you want it to do that. So we must create a filesystem. With Linux, you have many - dozens - of different filesystems you can choose from. Why you would choose one over the others has mostly to do with what you are going to store in the filesystem. For general purposes (and certainly for a beginner
) stick with ext2/4 as they are the most common. I recommend using ext4 except for small devices like thumb drives or for /boot partitions. For these use ext2 for /boot and ext2 or fat32/ntfs for thumb drives if you need windows compatibility.So to recap: a portion of space on a drive is a partition. On these partitions, we create filesystems. Files are stored in a filesystem - not on a partition.
fdisk is a partitioning program. It does not create filesystems (also known as formatting). fdisk only manipulates drives at the partition system level. Once you created a partition, you must then create a filesystem on it so you can use it.
mkfs (MaKe File System) is the command (actually a set of scripts) that creates the filesystems. We use mkfs.ext2 for ext2 and mkfs.ext4 for ext4. There are a series of options available you can list by typing mkfs.ext4 --help . One of these options is to set the UUID as I suggested in the previous post. To create swap partitions, the program is mkswap. You must have root privileges to use these programs, so you preface the commands with sudo: The command to format /dev/sdb1 with ext2 is sudo mkfs.ext2 /dev/sdb1 and so on. Also, the filesystem you are formatting or re-formatting must not be mounted for these to work. To unmount /boot, you would enter sudo umount /boot and to redo the swap partition the command is sudo swappoff --all
The -U switch does not work using fdisk because fdisk does not create filesystems and therefore does not create UUIDs.
Leave a comment: