Linux on a USB Key


Recommended Posts

So.. well I just got a 256MB USB Key, and I've been looking for a way to put Linux on it. (It'd be really nice to have some stuff like netcat and nmap, etc. available on a key and boot from it.)

I've already tried SPB Linux, and I can't seem to get that working. Syslinux doesn't want to install on the vfat filesystem on the key (tells me msdos fat is not supported) and when i format it as ext3 it doesn't want to work either.

I was trying to do that from my gentoo box here at work... now my question is i would like to build a distro on the key that is kinda like knoppix where it's compressed so i can put some small programs on it (like nc, nmap, and basic tcp/ip trace/net analyzer tools (tcpdump, etc.)), the whole purpose of the device would be to put on a network for security auditing, etc.

I would like to do a gentoo based system but based on all the files the base system comprises of i don't think i would have enough space on the usb key to do it, as well as customizing it to compress like knoppix does it.

So if anyone can point me in the right direction here, I really would like to try this out, as it could be a really useful tool for me.

Thanks!! :D

Link to comment
Share on other sites

I have never heard of someone putting Linux on a USB key before... But I suppose it can be done, if the PC supports booting from USB.

Does BIOS see the USB key as a drive?

You might have to install Linux ot the key, but have a boot disk to point to it (which isn't as elegant as the boot from USB option)

Link to comment
Share on other sites

Another thing. USB isnt initalized until the OS boots. so you cant really BOOT of a USB stick. if you figure that out. yuo should sell that sht in a book :)

from what i've seen around the gentoo forums, it's fully doable if the bios supports booting from usb since grub will be able to see it :)

i'll look at lnx thanks!

Link to comment
Share on other sites

Another thing. USB isnt initalized until the OS boots. so you cant really BOOT of a USB stick. if you figure that out. yuo should sell that sht in a book :)

Sure it will boot, if the BIOS supports it. That's why Dell is trying to eliminate floppies and are pushing the USB keys.

Link to comment
Share on other sites

Yeah, most of the latest BIOSes scan the USB ports for USB drives. At least, my new laptop does.

This is certainly possible and I've read articles where Linux has been put on a USB drive and booted. Best of luck finding out exactly how to do it, how's about trying another form of Linux that WILL work on a FAT drive?

Link to comment
Share on other sites

how's about trying another form of Linux that WILL work on a FAT drive?

USB flash drives can be partitions can be partitioned and formatted. You can put any distro you want on it as long as it is smaller than 256 MB.

Link to comment
Share on other sites

http://www.slackware-live.org (will be http://www.slax.org)

or if u want a movie only here is a 4MB linux distro which loads to the ram then pops ur cd out asking for ur DVD, VCD... http://www.geexbox.org u can also add extra codecs to teh ISO

hmmm... now that looks promising. but how should i go about taking that, and making it bootable on the usb drive?

gentoo would be a mighty too big. the extracted stage 3 is over 250mb, so unless i cut out a lot of crap, it's not gonna work, but if i can get a slack based one i'll be happy :)

Link to comment
Share on other sites

My suggestion would be to forgo Linux and try putting FreeBSD on it. FreeBSD tends to run a little smaller than Linux - and can run wonderfully off of solid-state or embedded systems/drives. 256MB is also plenty of space to fit an install of FreeBSD, too.

If you don't know BSD though - be prepared to learn - it handles some things really differently from Linux - such as it's usage of slices rather than disk partitions.

Good URL for installing FreeBSD on USB/CF/etc. drives (This is where I note that FreeBSD also tends to have better documentation than Linux ^_~)

http://www.freebsd.org/doc/en_US.ISO8859-1...tate/index.html

Whether or not your key works with FreeBSD - I can't say. I don't own one - and I don't think my mobo will let me boot from my CF card reader, so I've never tried. (Though, now that I think of it, I /think/ 'USB device' was in my boot options. Oh well.)

Link to comment
Share on other sites

My suggestion would be to forgo Linux and try putting FreeBSD on it. FreeBSD tends to run a little smaller than Linux - and can run wonderfully off of solid-state or embedded systems/drives. 256MB is also plenty of space to fit an install of FreeBSD, too.

If you don't know BSD though - be prepared to learn - it handles some things really differently from Linux - such as it's usage of slices rather than disk partitions.

Good URL for installing FreeBSD on USB/CF/etc. drives (This is where I note that FreeBSD also tends to have better documentation than Linux ^_~)

http://www.freebsd.org/doc/en_US.ISO8859-1...tate/index.html

Whether or not your key works with FreeBSD - I can't say. I don't own one - and I don't think my mobo will let me boot from my CF card reader, so I've never tried. (Though, now that I think of it, I /think/ 'USB device' was in my boot options. Oh well.)

I know a little bit of BSD so that shouldn't be too much of a problem... I would like more to do linux first and then save it so i can rewrite back to it if i have a problem. but then i could be free to try bsd. I'm a big fan of BSD in general, so that would be cool to try.

thanks everyone for the help, sure is helpful :)

Link to comment
Share on other sites

Well, good luck! I've read a bit about people installing FreeBSD to solid-state media devices, and there seems to be a high degree of success!

Man, now I'm wanting to reboot so I can double check my BIOS to see if I was right about my boot options... Just because. I have a couple CF cards I'm not doing anything with, after all.

Link to comment
Share on other sites

Another thing. USB isnt initalized until the OS boots. so you cant really BOOT of a USB stick. if you figure that out. yuo should sell that sht in a book :)

umm.. my dell laptops can boot off USB keys... so can my dell desktops...

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.