How to install to a USB flash drive as if it was a USB HDD?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to install to a USB flash drive as if it was a USB HDD?
Solved: Mint seems to have a built-in install problem - edit your menu.lst
I've briefly looked around and didn't find a forum dealing with installation problems, but then I wear glasses, too, so please forgive me if I missed it. This is my first post here and I don't know your structure well yet, either.
I am experimenting with different distributions by installing them onto USB memory sticks. Sometimes, this gives me a persistent install, sometimes not, therefore I want to install Linux to the USB stick as if it was a hard drive to circumvent certain problems, such as getting rid of the open login for anyone, securely adding more users, not using casper files which may leave unused space on the stick, having a more reliable update system, and so on. I have no interest at all about dual-booting with any other system (but I want access to the host computer's hard drive), so I want a stand-alone USB solution to using Linux on USB memory sticks - plug it in, boot and go - a real computer on a stick. This should be a cake-walk, but I have had varying successes and far too many failures.
Some of the failures have been reliability related. Many of the installs have broken down for a few reasons, one of them is pretty serious. While Linux distros may be CD-sized (typically under 700Mb), by the time I install a few programs and wait a month, the empty space on the USB stick is now too small and it corrupts while updating Linux. A 4Gb memory stick should be considered the smallest size to use when installing Linux in this manner and I would go so far as to state 8Gb (or larger) would be better, if you are really serious about actually using the install. You can't have too much room.
I am also trying to figure out if some of the reliability problems are related to the quality of the memory stick itself. I have used the FlashMemoryKit Windows program to test the READ ability, but the free version does not test the WRITE reliability, therefore I am searching for a Linux way to test WRITEing. Since flash memory breaks down over time, if bad blocks can be written out of the block table at the same time, too, that's great.
My biggest problem when using Linux/Installer is GRUB. At Step 7, we are given the choice, in Advanced Options, of where to install the boot loader block and the help doesn't make it clear where to put it. The renaming of partitions (hd0 or sdb or sdb#) is confusing and I've installed it just about everywhere (that was safe).
At the moment, I am trying desperately to get Linux Mint working and I am getting nowhere. While I have gotten other installs, such as some Fedora and Ubuntu distros, to install in this way, at the moment I just can't get any Mint working. I have checked the MD5 checksums, so I know the install discs are OK, therefore I am missing something pretty obvious.
Can anyone help me solve some of these basic issues, please?
well, there are pros and cons of running a full hd install from usb
there are also pros and cons of running "frugal-persistent" installs from usb
Definition of HD install:
The system is installed and the filesystem, which is usually a compressed squashfs, lzma, or whatever, is de-compressed into the partition.
this is also called a "scatter-mode" install by some
menaing the system is vulnerable to system rot and breakage
Any Ubuntu install is this install.
Def of frugal install
The system remains as a compressed image, boots into ram usually or is mounted at boot up
The system is READ-ONLY, thus not susceptible to rot or breakage
most frugals have a "persistence" feature, this part of the system is prone to breakage
Pros of HD install(to a hd)
1) System usually uses half the ram a frugal of the same type requires
i.e., puppy as frugal starins at 128mb, while as a full hd install it runs quick
2) Everything within the filesystem is accesible
Cons of usb hd-install
1) lots of read-writes to usb shortens its life
2) the system will actually run slower from usb vs frugal on usb
and is prone to freezing if stressed.
Pros of frugal install to usb
1) most can use the "toram" mode where everything is copied to ram
and no drives are mounted
2) most are capable of both hd and frugal installs
3) most have a persistence feature enabling a psuedo-hd install
some dont even need an xtra parttion for persistence
such as Slax, tinycore, etc
As for grub
assuming your usb is ext2 or ext3?
I can tell you how to easily setup usb with grub with whatever distro(s)
just pop in a linux livecd/usb and post when you get to desktop and I'll tell all
I have attempted to reinstalled it to a USB stick and am just waiting to finish some things and reboot, to see if it works, but I can reinstall differently just as easily.
Mint 7 Xfce just came out, so I am dealing with it, right now.
Xfce boots fine off of the DVD, of course.
After I install and try to reboot, it won't even get past the BIOS screen.
Quote:
Originally Posted by linus72
If you already have grub installed to usb
can you post the menu.lst for usb?
Yes. (This particular attempt was being done on a Vista laptop.)
## ## End Default Options ##
title Linux Mint 7 Gloria XFCE, kernel 2.6.28-11-generic
root (hd1,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sdb1 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet
title Linux Mint 7 Gloria XFCE, kernel 2.6.28-11-generic (recovery mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.28-11-generic root=/dev/sdb1 ro single
initrd /boot/initrd.img-2.6.28-11-generic
title Linux Mint 7 Gloria XFCE, memtest86+
root (hd1,0)
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Windows Vista (loader)
rootnoverify (hd0,0)
savedefault
chainloader +1
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda2
title Windows Vista (loader)
rootnoverify (hd0,1)
savedefault
chainloader +1
if thats usb menu.lst
did you try changing
root (hd1,0)
to
root (hd0,0)
?
also, try changing root=/dev/sdb1 to the UUID number for the usb
to find usb UUID
open a terminal
become root with
sudo su
and with usb mounted enter
blkid
thats B L K I D
it should say
/dev/sdb1 UUID="something"
add only the numbers, not the quotes to your menu.lst
if thats usb menu.lst
did you try changing
root (hd1,0)
to
root (hd0,0)
?
I'm not allowed to even see the menu.lst on the DVD, therefore it is the one in the USB install.
I have not attempted to fiddle with anything yet and my past attempts at changing to the UUID number has failed so I need to be more cautious (or informed).
Not burning you down on Mint
but Sidux-xfce will run
out of the box
with no issues as its usb installer is setup to use ext2 ext3 usb and grub
and it doesnt need an extra parttion to save to
and it can boot fromiso http://sidux.com/
No problem. I understand about picking other distros, as I have been doing this for a while, but I wanted to get Mint going. It comes with support I feel should be included "in the box" and a lot of other distributions are more hardcore or more work to get comfortable than I want to deal with, at this stage.
What I am trying to figure out is whether Mint's installation has some sort of inherent problem (bug) or not. I have Mint 6 installed on another hard drive and have had a couple of USB installs of Mint 7 Gnome blow up on me (they did work, in the beginning). Now, I can't get any new install running, which is very curious.
So, I will ask now:
When it comes time to deal with GRUB, where is it supposed to be installed on a USB stick?
In the list, there are separate choices for sdb, sdb#, etc.
No problem. I understand about picking other distros, as I have been doing this for a while, but I wanted to get Mint going. It comes with support I feel should be included "in the box" and a lot of other distributions are more hardcore or more work to get comfortable than I want to deal with, at this stage.
What I am trying to figure out is whether Mint's installation has some sort of inherent problem (bug) or not. I have Mint 6 installed on another hard drive and have had a couple of USB installs of Mint 7 Gnome blow up on me (they did work, in the beginning). Now, I can't get any new install running, which is very curious.
So, I will ask now:
When it comes time to deal with GRUB, where is it supposed to be installed on a USB stick?
In the list, there are separate choices for sdb, sdb#, etc.
OK, I changed the root path in menu.lst for the first entry and it booted.
I will also have to re-edit the other menu.lst entries for Mint 7.
Now, I had to do a similar edit to a previous install and I am thinking it was also for a Mint distribution, but the booting problem manifested itself a bit differently this time and I didn't associate the two problems as being related.
So, I am wondering why Mint is set up this way?
This is not something anyone should have to do.
Now, I also have two hd0,0s (the other is for Vista, which may be no problem until I try to boot it, I guess) and I have no idea what kind of problems will emanate from that combination or any other combination with other computers. I have no plans on using Vista with the stick, but I am sure I should do something about it.
At the moment, on this 4Gb stick, I have 1Gb free now, so that is a half decent start. I have a couple of 8Gb sticks waiting to be configured, too, with Mint 7 Gnome or whatever else I test, so I am not completely finished yet.
I've gotten a few important things straightened out now and I will mark the thread as solved.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.