LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-13-2017, 05:21 PM   #1
lax luthier
Member
 
Registered: Feb 2017
Location: Santa Barbara Co. Ca
Distribution: Ubuntu 16.04 LTS
Posts: 51

Rep: Reputation: Disabled
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 -
 
Old 04-13-2017, 06:16 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by lax luthier View Post
... 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.
 
Old 04-13-2017, 07:43 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
In addition, typically you need to delete the partition table and then recreate it with a new partition. As suggested use gparted.
 
Old 04-13-2017, 08:08 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I just simply use gParted delete everything then reformat it to my taste.
 
1 members found this post helpful.
Old 04-13-2017, 08:18 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
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?
 
1 members found this post helpful.
Old 04-14-2017, 05:24 AM   #6
fatmac
LQ Guru
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,487

Rep: Reputation: Disabled
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.
 
Old 04-15-2017, 02:05 AM   #7
lax luthier
Member
 
Registered: Feb 2017
Location: Santa Barbara Co. Ca
Distribution: Ubuntu 16.04 LTS
Posts: 51

Original Poster
Rep: Reputation: Disabled
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 -

Last edited by lax luthier; 04-15-2017 at 02:20 AM.
 
Old 04-15-2017, 03:48 AM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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.
 
Old 04-15-2017, 03:08 PM   #9
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,980

Rep: Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624Reputation: 3624
Is this a syslinux deal?
 
Old 04-15-2017, 03:25 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
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
 
Old 04-15-2017, 06:54 PM   #11
lax luthier
Member
 
Registered: Feb 2017
Location: Santa Barbara Co. Ca
Distribution: Ubuntu 16.04 LTS
Posts: 51

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jefro View Post
Is this a syslinux deal?
No, startup disk creator was used to make the Mint Cinnamon 64 bit bootable drive.

Thanks !
 
Old 04-15-2017, 07:00 PM   #12
lax luthier
Member
 
Registered: Feb 2017
Location: Santa Barbara Co. Ca
Distribution: Ubuntu 16.04 LTS
Posts: 51

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
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 !
 
Old 04-15-2017, 07:06 PM   #13
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
sudo gparted

sudo parted
 
1 members found this post helpful.
Old 04-16-2017, 08:16 AM   #14
lax luthier
Member
 
Registered: Feb 2017
Location: Santa Barbara Co. Ca
Distribution: Ubuntu 16.04 LTS
Posts: 51

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
sudo gparted

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting a bootable USB stick makes the stick non-bootable PeterSteele Red Hat 6 03-15-2013 01:44 PM
What the hell is a bootable ISO and a bootable USB-stick? duplex Linux - Software 15 11-23-2012 08:00 PM
GRUB: Booting from USB; Creating the Ultimate Bootable USB Stick Jinouchi Linux - Software 2 04-07-2010 04:17 PM
Making a USB stick bootable from a bootable cdrom cwwilson721 Slackware 2 10-23-2009 09:18 PM
may install from cdrom to USB FLASH DRIVE(to get it a USB stick bootable) the ubuntu lse123 Linux - Newbie 5 01-02-2009 04:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration