But it is only after you delete an entire drive full of data that you truly understand the value of a backup.
"Fixing" problem USBs
Re: "Fixing" problem USBs
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
- Head_on_a_Stick
- Posts: 919
- Joined: Sun Mar 17, 2019 3:37 pm
Re: "Fixing" problem USBs
To backup a partition table use
To restore the table:
To make a backup while wiping the filesystem signatures use
To restore the signatures:
Replace $backup_file with the name of the backup file, which will be called wipefs-sdX-OFFSET.bak, use the OFFSET number in the seek option.
Code: Select all
sgdisk --backup=sdX_table.bak /dev/sdX
Code: Select all
sgdisk --load-backup=sdX_table.bak /dev/sdX
Code: Select all
wipefs --all --backup /dev/sdX
Code: Select all
dd if=$backup_file of=/dev/sdX seek=$((OFFSET)) bs=1 conv=notrunc
mod note: Signature removed, please read the forum rules
Re: "Fixing" problem USBs
Thank you @Head_on_a_Stick. I have added all of your latest suggestions.
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
Re: "Fixing" problem USBs
... Too many roads to "Fixing" problem USBs ;-)
Here I used "udiskie -nt" with success for some issues with some usb keys.
Here I used "udiskie -nt" with success for some issues with some usb keys.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32
Re: "Fixing" problem USBs
Thank you! I have added your contribution.
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
Re: "Fixing" problem USBs
Your are welcome manyroads ... the idea was from handy:
viewtopic.php?p=500514#p500514
viewtopic.php?p=500514#p500514
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32
- Head_on_a_Stick
- Posts: 919
- Joined: Sun Mar 17, 2019 3:37 pm
Re: "Fixing" problem USBs
Well I don't really agree that the live-usb-maker tool is necessarily any safer than the simple commands I listed because the all it does it list any connected drives that have "1" in /sys/block/sdX/removable and this would include any USB-attached drives.fehlix wrote: ↑Mon Jun 17, 2019 5:42 pm And partition-clear shall actually exactly do what the other two tools supposed to do. In addition partition-clear gives you a kind of safety measure for you system,
as it will only provide you found USB device to select from.
With running sgdisk and wipfs you have the chance twice to wipe your system.
So I would not really recommend those "dangerous" commands to "newbies" nor to "oldies", as with one wrong pressed key your system might be wiped.
Here's an example to illustrate why your tool can be dangerous:
Code: Select all
demo@mx1:~
$ sudo live-usb-maker partition-clear
Creating new config file /root/.config/live-usb-maker/live-usb-maker.conf
===============================================================================
Starting live-usb-maker
===============================================================================
The live media is not mounted
Please select the target usb device
> sdb 3.8G Generic Flash Disk
> sdc 931.5G TOSHIBA MK1059GSM
Press <Enter> to select the highlighted entry
Use 'h' for help, 'r' to redraw, 'q' to quit
Not "safe" at all...
I would recommend that people use their brains rather than rely on a third-party tool that may offer false reassurances.
To make sure the correct device is used for my suggested commands first run this command in a terminal:
Code: Select all
dmesg -w
Now plug in the problematic USB stick and wait for the new messages, for example:
Code: Select all
demo@mx1:~
$ dmesg -w
[list of old kernel messages]
[ 1197.183867] usb 1-4: new high-speed USB device number 5 using xhci_hcd
[ 1197.315852] usb 1-4: New USB device found, idVendor=0951, idProduct=1665, bcdDevice= 1.00
[ 1197.315856] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1197.315858] usb 1-4: Product: DataTraveler 2.0
[ 1197.315860] usb 1-4: Manufacturer: Kingston
[ 1197.315862] usb 1-4: SerialNumber: 60A44C413E29FE61EB4CF82B
[ 1197.316592] usb-storage 1-4:1.0: USB Mass Storage device detected
[ 1197.317441] scsi host3: usb-storage 1-4:1.0
[ 1198.396398] scsi 3:0:0:0: Direct-Access Kingston DataTraveler 2.0 1.00 PQ: 0 ANSI: 4
[ 1198.397247] sd 3:0:0:0: Attached scsi generic sg3 type 0
[ 1198.397515] sd 3:0:0:0: [sdd] 15131636 512-byte logical blocks: (7.75 GB/7.21 GiB)
[ 1198.397784] sd 3:0:0:0: [sdd] Write Protect is off
[ 1198.397786] sd 3:0:0:0: [sdd] Mode Sense: 45 00 00 00
[ 1198.398033] sd 3:0:0:0: [sdd] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[ 1198.405287] sd 3:0:0:0: [sdd] Attached SCSI removable disk
Even newbies & oldies should be able to follow this method without risk of being confused
mod note: Signature removed, please read the forum rules
Re: "Fixing" problem USBs
Yes, you can clear your usb-backup drive, if you want
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB
Re: "Fixing" problem USBs
If people used their brains the forums would be really quiet!Head_on_a_Stick wrote: ↑Tue Jun 18, 2019 2:38 pmI would recommend that people use their brains rather than rely on a third-party tool that may offer false reassurances.
Re: "Fixing" problem USBs
+8 :lipsrsealed:sunrat wrote: ↑Tue Jun 18, 2019 7:00 pmIf people used their brains the forums would be really quiet!Head_on_a_Stick wrote: ↑Tue Jun 18, 2019 2:38 pmI would recommend that people use their brains rather than rely on a third-party tool that may offer false reassurances.
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken