In the context of:
sudo dd if=/storeM/os-dvd.iso of=/dev/sdb bs=8M
sudo dd if=/storeM/bootdisk.img of=/dev/sdc
from:
Linux: Copy DVD ISO to empty hard disk / partition and boot as if it is a DVD?
What is a specific dd command which will write the Ubuntu ISO to an external hard drive?
The external SATA hard drive is connected with a USB adapter.
Is just one dd command required, or are two command necessary in this context? Aside from r/w speed, is there a functional distinction between a USB thumb driver here, versus that the hdd is in fact SATA?
The goal being to boot from the external hdd and install Ubuntu on the internal hard drive. (This PC is running 16.x, so looking for a clean install.)
From:
dd command to create bootable iso image of hard disk
it looks like, perhaps, mkisofs must be used first on the SATA external hdd before writing the ISO -- but I'm not sure.
Before connecting the external hdd, output of lsblk:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
sda 8:0 0 149G 0 disk
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 148.5G 0 part
│ ├─ubuntu--vg-swap_1 253:1 0 8G 0 lvm [SWAP]
│ └─ubuntu--vg-root 253:0 0 140.5G 0 lvm /
└─sda1 8:1 0 487M 0 part /boot
and after:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdf 8:80 0 335.4G 0 disk
├─sdf5 8:85 0 4G 0 part
├─sdf1 8:81 0 331.4G 0 part /media/nicholas/3e798148-4333-4add-ba6c-f4272c17263e
└─sdf2 8:82 0 1K 0 part
sr0 11:0 1 1024M 0 rom
sda 8:0 0 149G 0 disk
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 148.5G 0 part
│ ├─ubuntu--vg-swap_1 253:1 0 8G 0 lvm [SWAP]
│ └─ubuntu--vg-root 253:0 0 140.5G 0 lvm /
└─sda1 8:1 0 487M 0 part /boot
so that sdf should be used with dd? Or sdf1 perhaps?
And, should the drive be unmounted first? I saw mention of this, but that makes no sense, as there'd then be no way to write to the drive.
the commands I'm looking at are:
sudo umount /dev/sdf1
dd bs=4M if=/home/nicholas/Downloads/ubuntu-20.10-desktop-amd64.iso of=/dev/sdf1 status=progress
although the umount seems a bit odd.
After running the above commands, and I tried both hd<letter><num> and hd<letter>, not able to boot from the external hdd.
From the console, the external hdd:
$
$ ls /media/nicholas/Ubuntu\ 20.10\ amd64/
boot boot.catalog casper dists EFI install md5sum.txt pics pool preseed README.diskdefines ubuntu
$
$ head /media/nicholas/Ubuntu\ 20.10\ amd64/md5sum.txt
b465ba8b742fd78bbc4ebe723cfaa6f4 ./dists/groovy/main/binary-amd64/Release
2e5d62033421377dcb2139c3fe3747bf ./dists/groovy/main/binary-amd64/Packages.gz
8ce3f65089cccda8e73740147e72f75e ./dists/groovy/main/binary-i386/Release
316c3582e4e7e6c1f4849c6ec289eae5 ./dists/groovy/main/binary-i386/Packages.gz
5b4060ef05e943ae4e897cd3fc61f68c ./dists/groovy/restricted/binary-amd64/Release
d1005d9afd8a9535834e19cc0e643b28 ./dists/groovy/restricted/binary-amd64/Packages.gz
653b1f1c47f3ac060482837c958f729d ./dists/groovy/restricted/binary-i386/Release
25184f6e9eebacaadf48da80cbe3407a ./dists/groovy/restricted/binary-i386/Packages.gz
222742d7b5141bab6293eee4b2d42308 ./dists/groovy/Release
46c924df68103249edd11811a272b50a ./dists/groovy/Release.gpg
$
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 0 335.4G 0 disk
├─sdb2 8:18 0 4.9M 0 part
├─sdb3 8:19 0 300K 0 part
└─sdb1 8:17 0 2.8G 0 part /media/nicholas/Ubuntu 20.10 amd64
sr0 11:0 1 1024M 0 rom
sda 8:0 0 149G 0 disk
├─sda2 8:2 0 1K 0 part
├─sda5 8:5 0 148.5G 0 part
│ ├─ubuntu--vg-swap_1 253:1 0 8G 0 lvm [SWAP]
│ └─ubuntu--vg-root 253:0 0 140.5G 0 lvm /
└─sda1 8:1 0 487M 0 part /boot
$
so, certainly dd wrote something to the SATA drive. But perhaps mkisofs must be used before dd?
