0

Was looking to use PXE, but now just directly downloading the Windows 10 ISO as:

nicholas@mordor:~$ 
nicholas@mordor:~$ ll /media/nicholas/
total 18
drwxr-x---+ 5 root     root        5 Feb 19 18:23  ./
drwxr-xr-x  4 root     root        4 Jan 25 12:11  ../
dr-xr-xr-x  6 nicholas nicholas  492 May  5  2023  CCCOMA_X64FRE_EN-US_DV9/
dr-xr-xr-x  1 nicholas nicholas 2048 Apr 18  2023 'Ubuntu 23.04 amd64'/
drwxrwxrwx  1 nicholas nicholas 4096 Feb 19 18:15  win/
nicholas@mordor:~$ 
nicholas@mordor:~$ ll /media/nicholas/win/
total 13
drwxrwxrwx  1 nicholas nicholas 4096 Feb 19 18:15 ./
drwxr-x---+ 5 root     root        5 Feb 19 18:23 ../
nicholas@mordor:~$ 

thumb drive:

thumb

I've tried:

sudo dd if=/home/nicholas/Desktop/Win10_22H2_English_x64v1.iso of=/media/nicholas/win/ bs=4M && sync

but that doesn't seem to work as it's a directory. How do I find the path to write to? The mount command returns many results.

1 Answers1

0

First of all, 'ISO' files are not disk images; they're CD/DVD images – don't assume that they're compatible with other kinds of disks unless their author says that they are. (Linux 'ISO' images are specifically prepared using isohybrid for that kind of usage, but that doesn't work for other operating systems.) See yesterday's thread about copying Windows.iso to a thumbdrive.

So none of the below will be useful in this case; it's just for reference.

but that doesn't seem to work as it's a directory. How do I find the path to write to? The mount command returns many results.

  • When using mount, look specifically for the result that mentions "/media/nicholas". There will generally be only one such item in the output. (Use findmnt for a more readable format.)

    $ mount | grep nicholas
    /dev/sde2 on /media/nicholas type vfat (etc,etc,etc)
    
  • Another way to do that is df /media/nicholas or findmnt -T /media/nicholas which will generally output just the line you need.

  • Another, much easier way is to look at the output of lsblk:

    $ lsblk
    NAME        MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
    sde           8:0    1  15.6G  0 disk  /media/nicholas
    sdd           8:48   0   5.5T  0 disk
    └─sdd1        8:51   0   5.5T  0 part  /data
    
  • Or even lsblk -S:

    $ lsblk -S
    NAME HCTL       TYPE VENDOR   MODEL  REV SERIAL            TRAN
    sda  0:0:0:0    disk General  UDisk 5.00 General_UDisk-0:0 usb
    

With some of the above commands, the result might point to a partition device such as "sda2"; in that case remove the number to get the whole-disk device such as "sda". Disk images are practically always whole-disk – they bring their own MBR, their own partition table, etc.

As noted in the comments, don't forget to umount the filesystem first, otherwise it might corrupt the image you wrote (or the opposite, the image might crash the OS when the filesystem tries to make sense of it).

Finally, you could also just click "Open in Disks" which then offers you the menu option "Restore from image", which does the same thing as dd.

grawity
  • 501,077