DebianThis forum is for the discussion of Debian Linux.
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.
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.
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?
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.
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.
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.
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!
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.
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.