LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 12-25-2004, 09:51 PM   #1
nagromo
Member
 
Registered: Mar 2004
Location: Minnesota, USA
Distribution: Debian, Mepis
Posts: 65

Rep: Reputation: 15
Installing Debian on a (fat32) USB hard drive


I'm trying to install Debian on my new USB hard drive. The trouble is that it's also a nice mp3/wav/ogg player, so I don't want to just reformat it.

Now it's in FAT32 (linux vfat?). I think there would be problems running Linux from it because of the lack of symbolic links, right? Also, I don't want to remove any current directories and files, only add the ones needed by Linux.

I read about how it's possible to put an entire ext3 filesystem onto a vfat file; would that be a good way to do this?

I don't mind using a bootable floppy or miniCD; many older BIOSes don't boot from USB, and I wnat it to still be compatible with them. It would be even nicer if I could boot with or without a floppy/cd, though.

I also want it to auto-detect hardware at startup, such as which video module to use. Would just copying scripts from Knoppix work?

How would I go about setting up Debian like this? I couldn't use the standard installer, could I?

If Debian is poorly suited to this, would there be a better distro to use for this?

Sorry I'm so scatterbrained, I just have a ton of ideas about what might work or what might be a problem and I have no experience or solid knowlege on the subject.

Thanks for all the help.
 
Old 12-27-2004, 12:39 PM   #2
six6
Member
 
Registered: Jun 2004
Location: In Adamantine Chains and penal Fire
Distribution: Debian Sarge & Ubuntu Breezy
Posts: 107

Rep: Reputation: 16
Hmm, my guess would be you should create an ext3 filesystem big enough to handle a Knoppix installation (like the CD, not the other Debian option) on the disk. That way you'll have the hardware detection, and it'll save you from "reinventing" Knoppix (copying over the hardware detection portions to a default debian install).

Though, I don't know much about just installing onto a fat32 filesystem. It wouldn't be secure, because permissions are all screwed up too on fat32 filesystems. That's why I suggest you create an ext3 system on it (if that's safe). Do you have a link to where you read about ext3 on fat?
 
Old 12-27-2004, 01:18 PM   #3
nagromo
Member
 
Registered: Mar 2004
Location: Minnesota, USA
Distribution: Debian, Mepis
Posts: 65

Original Poster
Rep: Reputation: 15
Oops... I thought that I had read about ext3 on a vfat file when reading about ZipSlack, but that uses umsdos filesystem. I guess I was wrong.

I e-mailed the makers of the mp3 player about the possibility of resizing the partition, though. I may be able to resize the vfat partition and create a separate partition for Linux. If I can do that it will make my life much simpler.

About using Knoppix instead of Debian, if I used the Knoppix HDD-install to put it on my mp3 player, how different would it be from a standard Debian system? I.E. could I use apt-get to remove KDE and install all of my own packages? All I really want from Knoppix is the boot sequence and hardware detection. If I could use apt-get to upgrade the kernel and change the installed packages then it sounds like a great option.
 
Old 12-27-2004, 01:39 PM   #4
six6
Member
 
Registered: Jun 2004
Location: In Adamantine Chains and penal Fire
Distribution: Debian Sarge & Ubuntu Breezy
Posts: 107

Rep: Reputation: 16
Quote:
About using Knoppix instead of Debian ... how different would it be from a standard Debian system? ... could I use apt-get ... install all of my own packages? All I really want from Knoppix is the boot sequence and hardware detection ... If I could use apt-get to ... then it sounds like a great option.
Check out Kanotix instead.
 
Old 01-04-2005, 07:27 PM   #5
nagromo
Member
 
Registered: Mar 2004
Location: Minnesota, USA
Distribution: Debian, Mepis
Posts: 65

Original Poster
Rep: Reputation: 15
I installed Kanotix on it and it installed fine. The main problem is that Grub doesn't support USB hard drives. How likely would it be to work if I installed something else and just took Kanotix's startup scripts?

I'm thinking something more like Gentoo is what I'm looking for as I have some very non-standard installation requirements, but I don't know enough about the hardware and the X to write the kind of hardware detection found in Kanotix.

Would it be more likely to work if I used a CD as /boot and compiled USB mass storage support into the kernel? To do that, though, I would need to use an installation procedure more like Gentoo's installation, where you do everything yourself.

I'm thinking I would install it normally, then edit /boot/grub/menu.lst and etc/fstab and put /boot into the root of a CD-R (and figure out how to make my own bootable CD-R without using someone else's ISO). I would just use a floppy, but my system.map is ~800k, my initrd is 4MB, and my kernel is ~1.2MB, and I have three of each.

Would you recommend doing that with Kanotix? How would you recommend booting when / is on a usb device?

Hopefully I can get this Kanotix installation to work and just slowly change it to fit my specialized needs.
 
Old 01-04-2005, 11:19 PM   #6
six6
Member
 
Registered: Jun 2004
Location: In Adamantine Chains and penal Fire
Distribution: Debian Sarge & Ubuntu Breezy
Posts: 107

Rep: Reputation: 16
Because of the custom hardware detection scripts, I doubt just creating a bootdisk with grub on it pointing to the right place will work (just a hunch though; it may work). Besides, at that point (needing to carry around an extra CD), you may as well just create a custom version of Knoppix/Kanotix/Debian and put it all on CD. So, I can think of three options for you, in increasing order of difficulty:

- Forget customizing on the harddrive and just make a custom cd image. Carry that around with the harddrive. This way almost guarantees backwards compatability.
- If you want the whole thing on the external drive, some quick googling turned this up; you'll have to modify it to work with Kanotix. There might be easier guides on Knoppix.net, but their site is down for maintenance right now so I can't check. Ask around on the Kanotix forum if the "Knoppix on USB ..." instructions don't seem to apply much, but I bet it won't be much different. You might also sift through the knoppix.net forums.
- Go with the Gentoo approach. I have a feeling this will either be darn tough or you'll stumble across a Gentoo guru who can help.

No matter what choice you make, I suggest you create a webpage with the steps you take so others can learn how you did it!
 
Old 01-05-2005, 12:07 AM   #7
six6
Member
 
Registered: Jun 2004
Location: In Adamantine Chains and penal Fire
Distribution: Debian Sarge & Ubuntu Breezy
Posts: 107

Rep: Reputation: 16
About grub not having usb support, well that doesn't matter, just whether or not your computer can boot off usb.

I found some information on a debian package that may help you along the way. From "apt-cache show mkinitrd-cd":

Quote:
Description: Creates an initrd image for booting from a live CD-ROM or USB device
This is the package used by the Gibraltar project to create the initrd images
used for booting from CD-ROM or USB sticks. The bootable CD-ROMs or USB
mass storage devices are actual live CD-ROMs respective live filesystems.
That is, the root file system is the CD-ROM or an image on the USB device,
ramdisks are the only things needed for operation without a hard disk.
Although a harddisk can be used for e.g. storing log files permanently or
when the machine acts as a proxy server.
.
Given a kernel image and the corresponding modules, it creates a complete
boot image that can be written to floppy or be used as El Torito image for
a bootable CD-ROM. Additionally, it is possible to create an initrd image to
be used on a USB stick (e.g. with syslinux). Upon bootup, the initrd image
will try to locate an ATAPI CD-ROM drive or a USB mass storage device. When
this does not succeed, it auto-probes for SCSI adapters and tries to locate
SCSI drives. It also works when multiple CD-ROM drives are installed in the
system by checking if the inserted CD is the correct one for booting.
.
The package can be of use to developers and packagers who want to create
their own bootable, live Debian CD-ROM or bootable, live Debian USB stick.
It will probably not be of any use to others.
 
Old 01-05-2005, 12:33 AM   #8
nagromo
Member
 
Registered: Mar 2004
Location: Minnesota, USA
Distribution: Debian, Mepis
Posts: 65

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by six6
About grub not having usb support, well that doesn't matter, just whether or not your computer can boot off usb.

I found some information on a debian package that may help you along the way. From "apt-cache show mkinitrd-cd":
That's the thing, though; I want it to work even on computers that don't have BIOS support for booting from USB. I would boot from floppy or mini-CD, the filesystem would just be on the USB drive.

That package looks promising, though. "Upon bootup, the initrd image will try to locate an ATAPI CD-ROM drive or a USB mass storage device." It seems like if I could get it to load the initrd and kernel from a different media that BIOS boots from then it wouldn't matter whether BIOS supports booting from USB because it would boot from CD and then use the kernel's usb support. I was worried about how to name the USB hard drive in grub, as its number depends on the number of hard drives in the system.

I think that the best way to do this is to get it set up on a computer that can boot from USB (not mine, unfortunately) and modify /boot/grub/menu.lst and /etc/fstab so that it mounts the CD as /boot.

I also ended up creating a 256MB swap partition on the mp3 player because I don't know what swap, if any, the host computers will have.

I think I'm actually going to reinstall it as a direct copy of the CD to hard drive; I can turn it into a standard Debian system myself (hopefully).
 
  


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
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Debian usb ntfs hard drive problem hutch Debian 4 09-28-2005 09:33 PM
Installing Debian 3.0 from a hard drive copy? everest Debian 2 07-01-2004 06:55 PM
Installing Debian From Hard Drive MrSmee Debian 3 10-21-2003 07:01 AM
Installing USB hard drive shaydwyrm Linux - Hardware 0 07-24-2003 12:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 07:16 AM.

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