|
/ # parted /dev/sda
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) rm 1
rm 1
(parted) rm 2
rm 2
(parted) rm 3
rm 3
(parted) rm 4
rm 4
(parted) rm 5
rm 5
(parted) rm 6
rm 6
(parted) rm 7
rm 7
(parted) q
q
Information: You may need to update /etc/fstab.
/ # parted -l
Model: ATA WDC WD60EFRX-68L (scsi)
Disk /dev/sda: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
Model: General USB Flash Disk (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 16.0GB 16.0GB primary fat32 boot, lba
/ # parted /dev/sda
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt
mklabel gpt
Warning: The existing disk label on /dev/sda will be destroyed and all data on
this disk will be lost. Do you want to continue?
Yes/No? y
y
(parted) mkpart primary 1049kB 2149MB
mkpart primary 1049kB 2149MB
(parted) mkpart primary 8591MB -1MB
mkpart primary 8591MB -1MB
(parted) mkpart primary 7517MB 8591MB
mkpart primary 7517MB 8591MB
(parted) mkpart primary 2149MB 3222MB
mkpart primary 2149MB 3222MB
(parted) mkpart primary 3222MB 4296MB
mkpart primary 3222MB 4296MB
(parted) mkpart primary 4296MB 6443MB
mkpart primary 4296MB 6443MB
(parted) mkpart primary 6443MB 7517MB
mkpart primary 6443MB 7517MB
(parted) q
q
Information: You may need to update /etc/fstab.
/ # parted -ls
Model: ATA WDC WD60EFRX-68L (scsi)
Disk /dev/sda: 6001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 2149MB 2147MB linux-swap(v1) primary
4 2149MB 3222MB 1074MB primary
5 3222MB 4296MB 1074MB primary
6 4296MB 6443MB 2147MB primary
7 6443MB 7517MB 1074MB ext4 primary
3 7517MB 8591MB 1074MB ext4 primary
2 8591MB 6001GB 5993GB ext4 primary
Model: General USB Flash Disk (scsi)
Disk /dev/sdb: 16.0GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 16.0GB 16.0GB primary fat32 boot, lba
/ # mkswap /dev/sda1
Setting up swapspace version 1, size = 2147479552 bytes
UUID=9120ec43-0d25-41d6-ba54-3b552f18a68d
/ # mkfs.ext4 /dev/sda3
mke2fs 1.42.13 (17-May-2015)
/dev/sda3 contains a ext4 file system
last mounted on /mnt/root on Wed Oct 16 01:35:28 2002
Proceed anyway? (y,n) y
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: f5ce079c-d2e1-447f-8c51-d5579fdf5627
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
/ # mkdir -p /mnt/usb /mnt/root
/ # mount /dev/sda3 /mnt/root
/ # mount /dev/sdb1 /mnt/usb
/ # cp -r /mnt/usb/boot /mnt/root/
/ # cd /mnt/root/boot
/mnt/root/boot # rm uImage uRamdisk
/mnt/root/boot # mv uImage-wdrecovery uImage
/mnt/root/boot # mv uRamdisk-wdrecovery uRamdisk
/mnt/root/boot # sync
/mnt/root/boot # cd
/ # ls
bin init libexec media proc sbin usr
dev lib linuxrc mnt root sys var
etc lib32 lost+found opt run tmp
/ # reboot -f
|
|