Re: Some help with dd backing up into an iso
- Date: Mon, 13 Mar 2017 18:39:00 +0000
- From: GiaThnYgeia <GiaThnYgeia@xxxxxxxxxxxxxxx>
- Subject: Re: Some help with dd backing up into an iso
Very good information but the word sudo comes up everywhere.
If a user does not have sudo rights she/he can back-up files and restore
them as long as s/he has rights to what their backing-up/restoring. So
if you are in a network public environment you may not even have rights
to even your own disk if some of it is somehow protected. And in some
places to protect the system and network mounting media is not allowed,
bios may be locked and prevent the machine from booting anything other
than its networked drive.
> the restore scenario for the xorriso backup would be like this:
> - Prepare the storage device to which you want to restore.
> This may be as simple as choosing some directory in a filesystem with
> enough free space, or as complicated as setting up a new operating
> system on a freshly purchased hard disk.
> - If the backup has some history of copying or transmission (e.g. by
> being burned to a DVD), then first let xorriso check whether it is
> still undamaged:
> xorriso -for_backup -indev "$iso" -check_media --
> will check the MD5 of superblock and directory tree and then read the
> whole ISO sequentially to look for the MD5 checksum tags. Those MD5s
> were stored by xorriso during the write run with setting -for_backup.
> Example of how a goot verification should look like (with lower speed
> if read from a real DVD):
> xorriso : UPDATE : Found matching MD5 superblock tag: start=32 size=18
> xorriso : UPDATE : Found matching MD5 tree tag: start=32 size=302
> xorriso : UPDATE : Found matching MD5 session tag: start=32 size=81217
> xorriso : UPDATE : 81250 blocks read in 1 seconds = 120.1xD
> Media checks : lba , size , quality
> Media region : 0 , 81250 , + good
> Media region : 81250 , 158 , 0 untested
> MD5 checks : lba , size , result
> MD5 tag range: 32 , 81217 , + md5_match
> "Media region" with quality "+ good" means that there were no i/o errors.
> "0 untested" means that these blocks are not claimed by the ISO filesystem.
> "MD5 tag range" with result "+ md5_match" means that the MD5 checksum
> of the inspected region matches the recorded MD5.
> - If you just want to pick some files by help of your favorite file
> copier tool, then mount the medium
> sudo mount "$iso" /media/user/iso
> or if the ISO is in a data file rather than on a DVD
> sudo mount -o loop "$iso" /media/user/iso
> Now you may copy files from /media/user/iso to the place where you want
> them to be. My favorite would be cp with option -a, possibly under sudo
> control for the power to assign file ownerships.
> (Caution: This can of course shoot your foot if you do not take care
> when composing the cp command.)
> - If you want to copy the whole ISO content from DVD to a directory tree
> on hard disk or if ACLs and Extended Attributes matter, it is advisable
> to let xorriso copy the files out of the ISO:
> sudo xorriso \
> -osirrox on:sort_lba_on:auto_chmod_on \
> -for_backup \
> -indev "$iso" \
> -extract / "$target"
> Only the superuser or sudo are permitted to assign file ownership to
> other users. Omit "sudo" if all restored files shall belong the user
> who operates xorriso.
> The -osirrox setting "on" enables command -extract. Setting "sort_lba"
> lets xorriso read the files from DVD in the order of their content
> block addresses. This avoids slow and loud laser head movements.
> Because this reading order may cause revisiting of directories which
> were already restored without wx-permission, the setting "auto_chmod_on"
> permits xorriso to temprorarily grant its user those permissions.
> Have a nice day :)
"The most violent element in society is ignorance" rEG