Forum › Forums › New users › New Users and General Questions › Remove antix / restore usb ?
- This topic has 10 replies, 7 voices, and was last updated Dec 14-7:21 pm by VW.
-
AuthorPosts
-
December 12, 2019 at 8:10 pm #30567Member
Splined
I have a USB stick that I was using as a live-usb testing Antix and now I’d like to restore it back to “normal”?
Using fdisk to delete the partition and create a new fat32 seems to work, and I can then use it as normal on my Windows comp.
But as soon as I open it on my antiX-17.2_x64-full laptop it shows that the live-usb files are still there and the “new” partition is gone. I’ve done this several times.lsblk
sdb 8:16 1 1.9G 0 disk /media/antiX-Live
└─sdb1 8:17 1 1.9G 0 partDisk /dev/sdb: 1.9 GiB, 2034237440 bytes, 3973120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x04611016Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 3973119 3971072 1.9G 83 Linuxand if I again take it to the Windows comp, the new files are readable and everything looks fine.
This wouldn’t be a problem, but I’m unable to mount sdb1 (error is /dev/sdb1 is already mounted). i.e. the new (fat32) partition. So I’m unable to access the usb on my laptop.I assume/hope there is a simple obvious step I’m missing, but I’m at a loss.
ThanksAttachments:
December 12, 2019 at 10:02 pm #30575Forum Admin
BitJam
::TL:DR: this was due fdisk failing to clear out the tricky “dd” live-usb partitioning. If you have antiX or MX available somewhere then use the live-usb-maker program to make the usb stick into a data usb.
This is a general problem with “dd” live usbs and most programs that handle partitioning. We suggest people avoid using “dd” live-usbs if possible or if they have to use one (like when coming from Windows) then they boot with “toram” option and use the live-usb-maker to convert their “dd” live-usb into a full feature live-usb which has many many benefits besides not having this problem.
“dd” live-usbs play tricks with the partition table which causes the problems you are seeing. I think the problem is that the program you used to re-format the usb got confused too.
If you don’t have antiX or MX elsewhere and if it still boots (which is doubtful) then you could boot with the “toram” option which frees up the live-usb. Then use live-usb-maker to convert the live-usb to a data usb. This is the ONLY program I know of that correctly clears out the strange partition table hijinks used on a “dd” live-usb. Most of the standard Linux utilities don’t work correctly. There was a time when gparted got so confused by a “dd” live-usbs that it could not do anything with them.
If you have some other version of Linux running you could try to download the cli version of live-usb-maker from my github reop and then use it to make a data usb.
There may be other programs that correctly clear out the wacky partitioning created by “dd” live-usbs but I don’t know of any for sure. If you have Linux and gparted then give gparted a try. Maybe the problems they had with “dd” live-usbs have been fixed.
Context is worth 80 IQ points -- Alan Kay
December 13, 2019 at 10:08 am #30627Member
Splined
::Thank you! Looks like that did the trick. I did have access to antix, so I just used usb live maker.
One question though, since there’s no “data cd” option that I can see I just used the “image mode” (dd) option and wrote a random .iso file I had lying around. I then just reformatted as usual.
Is that what you were suggesting when you said turn it into a data usb, or did I misunderstand?Thanks again for your help and the info.
December 13, 2019 at 10:47 am #30632Memberolsztyn
::Looks like that did the trick. I did have access to antix, so I just used usb live maker.
@BitJam:
This is a learning lesson for me too… I had no idea that power of Live USB Maker extends to resolving such partitioning issues.Live antiX Boot Options (Previously posted by Xecure):
https://antixlinuxfan.miraheze.org/wiki/Table_of_antiX_Boot_ParametersDecember 13, 2019 at 1:24 pm #30647Forum Admin
BitJam
::Thank you! Looks like that did the trick. I did have access to antix, so I just used usb live maker.
One question though, since there’s no “data cd” option that I can see I just used the “image mode” (dd) option and wrote a random .iso file I had lying around. I then just reformatted as usual.
Is that what you were suggesting when you said turn it into a data usb, or did I misunderstand?I’m glad to hear it worked out for you!
But this wasn’t what I suggested. If you made another “dd” live-usb you could have the same partition table problem as before. The options for “clear partition table” and “Format a data usb” were added within the past year or so. Maybe you had an older version of LUM available.
BTW: dolphin_oracle is working on an appImage version of live-usb-maker. H’mm. I just looked at it and I don’t see those two option in the GUI version. I think the may have other GUI wrappers for those functions. So I may have given you bad advice. It looks like I should have told you to use the command line version of “live-usb-maker”:
sudo live-usb-makerBut the important thing is you got a working data usb. Kudos!
Context is worth 80 IQ points -- Alan Kay
December 13, 2019 at 6:27 pm #30664Moderator
Brian Masinick
::I had a couple of USB drives that were not able to get recognized at boot time.
I ran live-usb-maker and used one of the images I have recently saved. It boots and works fine now.
--
Brian MasinickDecember 14, 2019 at 3:27 am #30672Member
fatmac
::I always use dd to clear the first 512b, (or 1M in rare cases), of the drive, then create a new partition in fdisk, & then put a filesystem on it.
If it is /dev/sdb
sudo dd if=/dev/zero of=/dev/sdb bs=512 sudo fdisk /dev/sdb sudo mke2fs /dev/sdb1Linux (& BSD) since 1999
December 14, 2019 at 3:00 pm #30702Forum Admin
BitJam
::I always use dd to clear the first 512b, (or 1M in rare cases), of the drive, then create a new partition in fdisk, & then put a filesystem on it.
If it is /dev/sdb
sudo dd if=/dev/zero of=/dev/sdb bs=512 sudo fdisk /dev/sdb sudo mke2fs /dev/sdb1This is what many programs do and it fails for clearing out “dd” live-usb partitioning. It certainly fails for clearing out gpt partition tables.
The live-usb-maker program (at least the cli version) will do this for you correctly. There are 3 partition tables that need to be cleared:
1) at the beginning of the device (for msdos and gpt partitioning)
2) at an offset of 32K (for sneaky “dd” live-usb partitioning)
3) at the very end of the device (for gpt partitioning)Context is worth 80 IQ points -- Alan Kay
December 14, 2019 at 3:34 pm #30707Moderator
caprea
December 14, 2019 at 3:52 pm #30708Forum Admin
BitJam
::At least on antiX19 there’s a gui now for that I think, called formatusb.
Excellent! I know that MX has a GUI wrapper for this functionality. Glad it’s on antiX as well. The extraneous addition of “mx-” to things sometimes confuses me. I put in a request to have this functionality and the creation of data-usbs added to the main gui wrapper for live-usb-maker. Dolphin_oracle is working on an appImage for live-usb-maker. If these features are added to the GUI wrapper then then could be used from the appImage on foreign distros.
Context is worth 80 IQ points -- Alan Kay
December 14, 2019 at 7:21 pm #30715Member
VW
::At least on antiX19 there’s a gui now for that I think, called formatusb.
It’s on antiX17 too. At least it is on this computer and I haven’t done anything out of the ordinary to change anything.
- This reply was modified 3 years, 4 months ago by VW.
“These are the times that try men's souls" - Thomas Paine
-
AuthorPosts
- You must be logged in to reply to this topic.
