Wir hängen eine Disk an den Client
- Ändern
- Massenspeicher
- Controller: SATA
- +
- Erzeugen
- VDI
- Volle Grösse nicht ankreuzen
Fdisk
- In den interaktiven Modus gelangen
- Print Partition Table
Command (m for help): p
Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4ae7dc2c
- Partition erstellen
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-41943039, default 2048): 2048
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-41943039, default 41943039): +5G
Created a new partition 1 of type 'Linux' and of size 5 GiB.
- Partionstyp ändern
Command (m for help): t
Selected partition 1
Hex code or alias (type L to list all): 7
Changed type of partition 'Linux' to 'HPFS/NTFS/exFAT'.
- Weiter Partitionen
Command (m for help): n
Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (2-4, default 2):
First sector (10487808-41943039, default 10487808):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (10487808-41943039, default 41943039): +10G
Created a new partition 2 of type 'Linux' and of size 10 GiB.
Command (m for help): n
Partition type
p primary (2 primary, 0 extended, 2 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (3,4, default 3):
First sector (31459328-41943039, default 31459328):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (31459328-41943039, default 41943039):
Created a new partition 3 of type 'Linux' and of size 5 GiB.
Command (m for help): t
Partition number (1-3, default 3):
Hex code or alias (type L to list all): 82
Changed type of partition 'Linux' to 'Linux swap / Solaris'.
- Resulat anschauen
Command (m for help): p
Disk /dev/sdb: 20 GiB, 21474836480 bytes, 41943040 sectors
Disk model: VBOX HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4ae7dc2c
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 10487807 10485760 5G 7 HPFS/NTFS/exFAT
/dev/sdb2 10487808 31459327 20971520 10G 83 Linux
/dev/sdb3 31459328 41943039 10483712 5G 82 Linux swap / Solaris
- Abspeichern
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Formatieren
- NTFS
- EXT4
- SWAP
Einhängen von Partitionen manuell
- Einhängepunkte erstellen
- mkdir /mnt/data
- mkdir /mnt/misc
- Mountieren
- mount /dev/sdb2 /mnt/data
- mount /dev/sdb1 /mnt/misc
- Aktiveren des SWAP
- mkswap /dev/sdb3
- swapon /dev/sbd3
- Anzeigen der Dateisysteme
/dev/sdb2 on /mnt/data type ext4 (rw,relatime)
/dev/sdb1 on /mnt/misc type fuseblk (rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096)
- Anzeigen des aktiven SWAPs
Filename Type Size Used Priority
/dev/sdb3 partition 5241852 0 -2
Einhängen von Partitionen Rebootfähig
- Einhängepunkte erstellen
- mkdir /mnt/data
- mkdir /mnt/misc
- UUID der Blockdevices rausfinden
/dev/sdb2: UUID="b2d05c9b-e78c-4ebf-9ae9-e2a363d5d4ff" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="4ae7dc2c-02"
/dev/sdb3: UUID="9ca10933-158c-4436-ac3c-36b0214ce746" TYPE="swap" PARTUUID="4ae7dc2c-03"
/dev/sdb1: BLOCK_SIZE="512" UUID="6F1F3B8D2BEE292E" TYPE="ntfs" PARTUUID="4ae7dc2c-01"
/dev/sda1: UUID="e6197f85-865f-4bd6-8c04-6acde3274fea" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="5f8bb37c-01"