create new tag
, view all tags
Want to think of a better name. Basically what I'm doing is trying to create a very small Linux installation on a hard drive, so I can run lilo and use it as a boot loader basically for a dos / Windows system. There are probably several ways to do it. (I saw a hint in some of the LRP (Linux Router Project) "overview" documentation that it could be installed to a hard drive, but so many of the links were bad I never found the actual instructions.)

The approach I'm taking: take a boot/root diskette set and install them on the hard drive following an approach that I'm describing in #Notes.

Some other approaches:

  • Find a small Linux distro (LRP) intended for a purpose like this
  • Make an install of a bigger distro, then delete all but the basic things needed for your purpose.

Aside: My usual approach on a Windows installation is to install a small dos bootable partition with a bunch of utilities like a boot loader (one comes with Partition Commander, I used to use the OS/2 boot loader), a partition tool (fdisk or Partition Commander), an imaging tool (Ghost or Drive Image). Since I'm now creating some images for a basically a charity, I'd like to avoid buying any licenses -- maybe I can use Linux utilities for all of those purposes (they certainly exist, I'd just have to confirm they work OK for Windows).

Some other potential page names:




Install a boot/root Diskette Set to a Hard Drive

I'm working on this (at home, and writing it up away from home from memory -- and, I haven't yet confirmed this works)

  • Boot with the desired boot / root diskette set
  • Create a small partition on the target hard drive using a convenient tool (cfdisk, parted), then install the desired file system (I used mke2fs followed by tune2fs -j to get an ext3 system) -- BTW, my new partition was at /dev/hdd3 -- I started with 100 MB, and was glad -- more later, and I will shrink it later
  • Mount the newly created partition at a convenient place (mount -t ext3 /dev/hdd3 /mnt/temp)
  • Copy everything from the root filesystem to /mnt/temp. This is not as simple as cp -a / /mnt/floppy because you will have a few problems:
    • You will run out of space because at some point you will be doing a "recursive copy" of the stuff you copied into /mnt/temp into a lower level of the tree under /mnt/temp
    • I don't think dev and proc should be copied this way -- suspect you'll run out of space or not get the results you expect (or maybe this was my problem rather than the recursive copy -- might have to try it again and look more closely
Anyway, because of the problems mentioned above, I proceeded as follows:
    • Used mkdir to create all the top level directories under /mnt/temp (i.e., all the directories found by doing ls /).
    • Then used, for example, cp -a /bin/* /mnt/temp/bin/ for each directory I wanted to copy "verbatim" (i.e., not including dev and proc)
    • Will soon do a Google search to find out how to copy (or replicate) /dev and /proc.
    • Because the boot/root set I was using (from Vector Linux) did not include lilo or any editor (??? not even vi), and I had a full install of Vector on another hard drive, I mounted it as /mnt/linux, then searched it for vi, lilo, and lilo.conf and copied those files to the same locations under /mnt/temp. (vi was a link to elvis, so I copied that as well -- there might be more I want to add some day)
  • Next steps (not done yet)
    • Revise lilo.conf as appropriate for the dos / windows partitions (and for this small Linux partition)
    • Move the target hard drive to hda and then run lilo in a chroot jail to update the boot loader in the MBR

Some success!! Dann Washko pointed out that mcedit is on the Vector install disks, I revised lilo, ran it, before I was successful I had to fool around with /dev -- found the best thing to do was copy from the dev in RAM to dev on /mnt/temp (occasionally ran out of space with some other approaches -- doen't know whether I was doing something wrong or not.

It is successful in that I can run lilo to boot Windows or Linux -- I wonder if I could boot Windows without a Linux (/boot) partition on the disk?

Quite a few problems remain to be resolved:

  • bottom of lilo screen doesn't mention Win95
  • get splash screen from install, press enter ...
  • message: cannot open /proc/partitions
  • filesystem is apparently mounted read only
  • things that don't work:
    • tab completion
    • su
    • no procs
  • <more later, I'm sure --probably need to dig into the startup scripts, etc.>


See ResourceRecommendations. Feel free to add additional resources to these lists, but please follow the guidelines on ResourceRecommendations including ResourceRecommendations#Guidelines_for_Rating_Resources.


  • (rhk) [[][]]; ; -

Recommended for Specific Needs

Some resources found re copying the file (system) without doing a recursive copy or copying the procs and dev directories. Found with a Google search [proc dev copy HOWTO].

  • (rhk) Hard Disk Upgrade Mini How-To: 7. Copy the files from the old disk to the new disk; ; - suggests using the -x option to cp to copy a "single filesystem" (will have to look that up), apparently all you have to do for procs is create the directory, and they mention no special handling for dev (except for dev/pts for SUSE). Mentions /sbin/telinit 1 and some other interesting stuff (alternatives to cp, bug in tar)

  • brief note on how to boot some LRPs from an IDE drive (simple, concise)

  • (rhk) [[][]]; ; -

The following are interesting but off-topic links which should be moved to other appropriate pages:

  • (rhk) JFS Root Boot HOWTO; Paul Larson; v1.0, May 22, 2001 - A definite digression, but interesting (move elsewhere) -- how to convert (a working system) from ext2 to jfs, give a simplified set of instructions for configuring and compiling the kernel -- add to pages like FilesystemsConversions and CompilingTheKernel.

  • (rhk) 4mb Laptop HOWTO; Bruce Richardson; 25 March 2000 - another digression, but could let me install Linux on my 8 MB laptop

  • (rhk) Linux EMBEDDING mini HOWTO; Luc Hermans; v0.2, 15 March 2000 - digression: "This document shows how to strip down your Linux OS, and provides one method of putting it in an embedded i386 PC and hopefully get it running." -

  • (rhk) Root RAID HOWTO cookbook; Michael A. Robinton; v1.13, July 17, 2000 - obsolete, but pointers to more recent documents -- among other things, how to boot from a RAID filesystem (IIUC)

  • (rhk) Encrypted Filesystem Howto; Christophe Devine; - "Make your personal data secure by building your LFS system inside a filesystem encrypted with strong cryptography." -- useful for the stated purpose, and for the insight provided by this line: cp -a /dev/{console,hda,hda1,hda2,loop0} /loader/dev/ -- may be useful to study the other scripts (of course, some things need "translation" for my efforts -- /loader probably corresponds to my /mnt/temp)

  • (rhk) Leaf HOWTOS -- Leaf is the successor to the LRP and looks interesting -- looks like there is a small distribution (Bering, derived from Shorewall), which might be installed on a hard drive (HOWTOs on this page), and instructions for installing a Samba printer, etc. Could be very useful. I'm doing some reading now.

Some tidbits from links found there:

Edit the etc/inittab to read:

c1:2345:respawn:/sbin/getty 38400 ttys/1
c2:2345:respawn:/sbin/getty 38400 ttys/2
c3:2345:respawn:/sbin/getty 38400 ttys/3
#4:23:respawn:/sbin/getty 38400 tty4
#5:23:respawn:/sbin/getty 38400 tty5
#6:23:respawn:/sbin/getty 38400 tty6

This will open 3 virtual UML consoles when booting up your Debian/slink virtual machine.

Edit the etc/securitty file and add the following entries:


  • Shorewall (Shoreline Firewall) -- The FAQ has some useful answers on the routing table entries required for various kinds of port forwarding and related things.
  • LEAF "Bering" User's Guide: 11. Booting Bering from different boot-media -- how to boot Bering from an IDE hard drive -- could be useful but seems to assume it is the first (and only?) partition, so probably needs some modification for my purposes. I don't understand these two sentences: "Boot a Bering floppy. Install on the /boot/lib/modules the ide-mod.o, ide-disk.o and the ide-probe-mod.o modules. Then declare those modules in /boot/etc/modules through the initrd package configuration menu in this order." - might become clear if I actually try the process. Also, sounds possible to convert to LILO. The rest of the document looks useful to, including the section on configuring a dial up modem (not the correct title of the section).

  • lrp.c0wz.com -- apparently what used to be the lrp.c0wx.com page -- list of interesting documentation including a hard disk HOWTO

  • SysAdmin, Feb,2003 -- something referred me to a specific article here, don't recall which, several look worth at least browsing

  • User Mode Linux HOWTO -- even further off topic, but I'd like to read -- ant their home page -- run Linux in a virtual machine, "inside" your Linux machine

  • LRP-Zip-HOWTO -- might give some additional insight into how to install to a hard drive (this, of course, is for a zip drive)

  • LRP-QoS-HOWTO -- "Quality of Service (QoS), Fair Queuing, bandwidth throttling/control/regulation, policy-based routing"

  • LRP-Load-Balancing-HOWTO -- "To be clear up front, this is not simple and frequently doesn't work the way you thought it would."

  • Installation Guides -- including WISP?? -- OK, "WISP-Dist is an embedded Linux distribution for wireless routers, but can be used for other purposes as well. Entire system fits in 8 MB flash/16 MB RAM."


  • () RandyKramer - 05 Mar 2003
  • () CablesurfrLou - 09 Dec 2004
  • <If you edit this page: add your name here; move this to the next line; and include your comment marker (initials), if you have created one, in parenthesis before your WikiName.>

Page Ratings

Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r10 - 2004-12-09 - CablesurfrLou
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look