LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reformatting a Mint bootable USB stick for storage use. (https://www.linuxquestions.org/questions/linux-newbie-8/reformatting-a-mint-bootable-usb-stick-for-storage-use-4175603802/)

lax luthier 04-13-2017 05:21 PM

Reformatting a Mint bootable USB stick for storage use.
 
Extensive searching of the web has not produced a workable result for accomplishing this task.

Restoring previous bootable USB sticks that I had made up with (at seperate times) the Zorin ISO and several versions of Ubuntu i.e. ISO's of 12.x, 14.x, and 16.04 were walk-throughs when using the Gparted (graphic version) utility. But various and sundry approaches to this endeavor have been thwarted when attempting to remove the Mint 18.1 ISO from the same 16 Gbyte USB stick.

I would have no problem with using Terminal for this, as long as I could have commands with proper syntax. As you are all probably aware, there are too many suggested command lines posted on the web that contain minute syntax errors which render them unusable.

Thanks for any assistance, and thanks again for the existence of the Linux
OS's.

Regards, - LL -

syg00 04-13-2017 06:16 PM

Quote:

Originally Posted by lax luthier (Post 5696628)
... there are too many suggested command lines posted on the web that contain minute syntax errors which render them unusable.

That's called a learning opportunity. Read the manpage(s) and fix the syntax error - that way you learn something for yourself. Commands change over time.

We don't know what you've tried, what went wrong. But generally you just remove the old partitions and maybe just create one new partition covering the entire space. fdisk or parted, both have help from within the command.
gparted is a GUI that will do it also.

michaelk 04-13-2017 07:43 PM

In addition, typically you need to delete the partition table and then recreate it with a new partition. As suggested use gparted.

BW-userx 04-13-2017 08:08 PM

I just simply use gParted delete everything then reformat it to my taste.

jefro 04-13-2017 08:18 PM

Hopefully you didn't boot to this iso image and then try to manage it.

When you say iso I assume you really did put an file of mint in a single iso on that drive. Do you want to erase the iso file?

fatmac 04-14-2017 05:24 AM

To clear all info in the boot area.
Code:

dd if=/dev/zero of=(your usb drive) bs=1024 count=1
Then use fdisk, create a new mbr, then create a partition & write it out to the drive.
Make a new filesystem on the partition, & then use your drive for whatever you want.

lax luthier 04-15-2017 02:05 AM

Details previously not included in initial post, sorry...
 
Apologies for not providing these details in my initial post.

Some clarifications regarding my attempts to remove the Mint iso from a 16 Gbyte USB drive and convert it back to its original data storage usage:

First, all operations were conducted while running an Ubuntu 16.04 LTS session, while normally booted from my hard drive, not while running off the USB drive.

Second, this may or may not be significant… I am running 16.04 LTS in 32 bit. The Mint Cinnamon ISO on the USB drive is 64 bit.

Third, I only ran the Mint distro in live mode, never installed it.

As I should have in the first post, I am posting the steps I attempted in detail, and the resulting messages received. Here is the blow by blow account.

1). Inserted USB drive, it shows up automatically in “Files".

2). Opened “properties” of the USB drive, attempted to change permissions to allow me (admin) to create and delete files, and received this:

Sorry, could not change the permissions of “Linux Mint 18.1 Cinnamon 64-bit”: Error setting permissions: Read-only file system

3). Exited “Properties”.

4). Opened gparted and received this:

The driver descriptor says the physical block size is 2048 bytes, but Linux says it is 512 bytes.

5). Clicked on “Cancel”, in the message box, then received this:

Partition(s) 1 on /dev/sdc have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.

I think it was reading the hard drive "dev". The USB drive never was displayed, after clicking "cancel" or "ignore" in the above message box.

Exited gparted.

Further mysteries:

Should be no reason to reboot; Booting not done from USB ISO drive.

No anomalies or odd messages showed up during this normal Ubuntu session, only those than those listed above.

Re:You should reboot now before making further changes. ( No changes were made. )

I hope this is helpful, and thanks to all for helping me in this matter, - LL -

AwesomeMachine 04-15-2017 03:48 AM

I'd try:
Code:


$ parted
select /dev/sdb
print
mklabel msdos
mkpart p ext4 1 16000

where /dev/sdb is your USB drive. Print simply prints the partition info to make sure you have selected the correct drive. Create a partition table label and partition the drive. Then:
Code:

$ mkfs.ext4 /dev/sdb
OR, i think you can omit the partitioning part nowadays and just do:
Code:

$ mkfs.ext4 /dev/sdb
But you might need the -f option.

jefro 04-15-2017 03:08 PM

Is this a syslinux deal?

michaelk 04-15-2017 03:25 PM

If the drive was created using syslinux I would expect a single FAT32 partition. Deleting the files should be sufficient. If the drive appears as something less then 16GB then as already suggested you need to delete the MBR. The warning was displayed as a note if you modified the MBR that the OS could still be using the old setup and that you need to reboot to reread the drive. You need to use run gparted using sudo to edit the MBR/partitions

lax luthier 04-15-2017 06:54 PM

Quote:

Originally Posted by jefro (Post 5697395)
Is this a syslinux deal?

No, startup disk creator was used to make the Mint Cinnamon 64 bit bootable drive.

Thanks !

lax luthier 04-15-2017 07:00 PM

Quote:

Originally Posted by michaelk (Post 5697403)
You need to use run gparted using sudo to edit the MBR/partitions

Where can I find help instructions (syntax) for gparted via terminal? or is it parted via terminal?

Thanks !

michaelk 04-15-2017 07:06 PM

sudo gparted

sudo parted

lax luthier 04-16-2017 08:16 AM

Quote:

Originally Posted by michaelk (Post 5697484)
sudo gparted

sudo parted

Thanks, found the help page in parted and I am studying the commands.


All times are GMT -5. The time now is 12:04 PM.