cp command to make bootable iso image usb

24

Solution 1

Devices in Linux are files. /dev/sda or /dev/sdb are files as well. So what you do is replace the /dev/sdX file with the dot-ISO file, which you can then mount and use as a device.

What sync does, is it forces the changed blocks on the virtual device (/dev/sda file) to be updated on the actual disk.

Solution 2

A possibly better way of doing it is with dd. which does byte copy. the syntax would be

dd if=debian.iso of=/dev/sdX

and the command will need to be run as root. dd allows you to have more control if you want it. Check out it's man page here or Debian instructions on how to create a bootable USB stick here.

(Where sdX maybe the full name of the drive, with the number, for instance /dev/sdc1.)

Share:
24

Related videos on Youtube

BARUN
Author by

BARUN

Updated on September 18, 2022

Comments

  • BARUN
    BARUN almost 2 years

    I've two pandas dataframe having one common column in both but they are not having same values. Wish to get the missing values to another dataframe common column.

    df1
    
    name    mobile  email
    abcd    992293  [email protected]
    efgh    687678  [email protected]
    ijkl    7878678 [email protected]
    mnop    678687  [email protected]
    qrst    6876    [email protected]
    
    
    df2
    
    name    age
    abcd    22
    efgh    12
    
    Expected output
    
    name    age
    abcd    22
    efgh    12
    ijkl
    mnop
    qrst
    
  • Tompa
    Tompa almost 11 years
    So the magic part of this is to perform the cp command on an unmounted device (file). It's like it was common knowledge when reading debian manual, and maybe it is? Anyway, it did work, my new machine booted the USB and wheezy installed, thanks.
  • Tompa
    Tompa almost 11 years
    And this command I guess is to be performed with a mounted device?
  • Mobius
    Mobius almost 11 years
    @Tompa, actually it doesn't matter. It would probably be better to use an unmounted device because you are overwriting the entire partition structure that is formatted in say fat or ext3 or ntfs and replacing it with the cdrom or dvd format (usually UDF). If the operating system is writing to the filesystem while it gets overwritten it could be a bad thing. the block device /dev/sdx basically is a virtual file allowing binary access to the entire harddrive.