Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 909  / 2 Years ago, sat, march 12, 2022, 10:24:24

Problem: I created 3 DVD's filled with Windows system recovery disks in case I ever have a hardware problem and need to re-install Windows in order to run diagnostic tests. However, I don't want to worry about losing them, so I would like to make backups of the recovery disks as ISO images which I can store on an external hard drive.



A Google search revealed that I can do this using the dd (or "disk dump") unix command.



dd if=/dev/who-knows-where? of=/home/wdkrnls/x201-recovery-2011-09-30.iso


But the snag is that Ubuntu doesn't use the old convention of associating /dev/cdrom with the cd-rom drive. Instead Nautilus automagically creates /media/CD_ROM which is a directory, and not the drive itself. I tried to run dd anyways and got:




/bin/dd: reading '/media/CD_ROM/': is a directory
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.0158501 s, 0.0 kB/s




I tried running dmesg | tail and saw a reference to:




[215135.134164] sr 9:0:0:0: Attached scsi generic sg1 type 5




So I tried ls /dev/sg1, but there wasn't any file called that. Only my partitions show up with sudo fdisk -l, leaving me stumped as to what to try next.



Solution: I figured out I could solve my problem with brasero or k3b and so abandoned my exploration of Ubuntu's internals. Nevertheless, I still wouldn't mind knowing how I would use dd to accomplish the same task.



How would I solve my problem with dd?


More From » 10.10

 Answers
7

Load a CD in the drive so it mounts. Open a command line interface and type 'df -h'



This will display all the mounted drives in your system.



Mine displays the following.



foo@MyBoX:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 448G 308G 118G 73% /
none 1.9G 768K 1.9G 1% /dev
none 2.0G 2.2M 2.0G 1% /dev/shm
none 2.0G 476K 2.0G 1% /var/run
none 2.0G 0 2.0G 0% /var/lock
/dev/sdb1 459G 12G 424G 3% /mnt/work_files
/dev/mapper/udisks-luks-uuid-7cc81eaa-5df2-4005-984f-18304c43735b-uid1000
4.0G 2.1G 2.0G 52% /media/thumbdrive
/dev/sr0 231M 231M 0 100% /media/cdrom0


It shows my device as /dev/sr0. So I would use:



dd if=/dev/sr0 of=/home/foo/somedir/recovery.iso


I have used this many times to create CD and DVD backups. You can also mount the iso on a loopback file and use it as if it was a CD/DVD. Handy for games that run under wine or Crossover that require a play CD.


[#43250] Sunday, March 13, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fishutt

Total Points: 391
Total Questions: 137
Total Answers: 106

Location: Mexico
Member since Tue, Aug 11, 2020
4 Years ago
;