gBootRoot pronounced "bOOtrOOt"
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1887 lines
69 KiB

<html>
<head><title>gBootRoot</title></head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E"
alink="#FF0000">
22 years ago
<center>$Id: index.html,v 1.117 2003/02/13 07:37:49 freesource Exp $</center>
<p>
<H1 align="center">gBootRoot</h1>
<H3 align="center">at</h3>
<p align="center"><A href="http://sourceforge.net/projects/gbootroot">
<IMG src="http://sourceforge.net/sflogo.php?group_id=9513&type=1"
width="88" height="31" border="0"
alt="SourceForge Logo"> </A></p>
23 years ago
<p align="center"><A HREF="http://www.icewalkers.com/app_vote.php?id=1178">
<img src="images/rateit80x18.gif" HEIGHT=18 WIDTH=80 BORDER=1></A></p>
<!-- <p align="center"><A HREF="http://www.softlandmark.com/linux/Administration1.htm">
<img src="images/Editorspick.gif" HEIGHT=34 WIDTH=99 BORDER=0></A></p>
<p align="center"><A HREF="http://search.freefind.com/find.html?id=6996492&pid=r&mode=ALL&n=0&query=gbootroot">
<img src="images/Editorspick.gif" HEIGHT=34 WIDTH=99 BORDER=0></A></p> -->
<p align="center"><img src="images/Editorspick.gif" HEIGHT=34 WIDTH=99 BORDER=0></p>
<p></p>
23 years ago
<!-- HEIGHT=18 WIDTH=80 BORDER=1 -->
<P align="center">
<b>bOOTrOOT</b> makes the development, construction, and
testing of distributions fun and simple.</P>
<br>
<H3>
Download gBootRoot</h3>
<b>Newest version</b><br>
22 years ago
<ul>
<li><em>1.5.0</em> available in tar.gz, deb, and rpm formats.
23 years ago
22 years ago
<li>Main repository:&nbsp;&nbsp;
<A href="http://prdownloads.sourceforge.net/gbootroot/">
22 years ago
http://prdownloads.sourceforge.net/gbootroot/</A>
<li>Mirror:&nbsp;&nbsp;
<A href="http://mirror.usermodelinux.org/gbootroot/">
http://mirror.usermodelinux.org/gbootroot/</A>
<li><em>Special New Features!!</em>
<ul>
<li> Now run gbootroot within user-mode-linux with user-mode-linux within
user-mode-linux, i.e. nested. Just install gbootroot within a root_fs.
<li>Works great under skas or tt - automatically figures out the proper mode.
<li>Keep up with jdike's latest uml patches with gbootroot's
automated source package. All required sources will be downloaded.
Just edit the PATCH_VERSION in the Makefile.
<li>Command-Line Interface to the Yard Method.
</ul>
22 years ago
<li>Milestone version 1.3.1 dedicated to the first ever
<a href="http://www.morlug.org">MORLUG</a> meeting in my
hometown!
22 years ago
</ul>
<b>Slackware or compiling it yourself</b><br>
22 years ago
<a href="http://freshmeat.net/redir/gbootroot/3075/url_tgz/gbootroot.tar.gz">gbootroot source</a><br>
<em>Instructions:</em><br>
README
<p>
<b>Debian based distributions</b><br>
<a href="http://freshmeat.net/redir/gbootroot/3075/url_deb/gbootroot_i386.deb">
gbootroot debian package</a><br>
<em>Instructions:</em><br>
apt-get --yes install gbootroot or dswim -qxyz gbootroot<br>
after adding these lines to your sources.list where ${country} is one of
22 years ago
easynews, unc, telia, umn, twtelecom, belnet, cesnet, or switch. ex: telia.dl.sourceforge.net:<br>
<code>deb http://${country}.dl.sourceforge.net/gbootroot ./<br>
deb http://${country}.dl.sourceforge.net/avd .<br>
deb-src http://${country}.dl.sourceforge.net/gbootroot ./<br>
deb-src http://${country}.dl.sourceforge.net/avd ./</code><br></p>
<p>
<b>RPM based distributions</b><br>
22 years ago
<a href="http://prdownloads.sourceforge.net/gbootroot/gbootroot-1.5.0-1mdk.i386.rpm">
Mandrake and Mandrake-type distributions</a><br>
22 years ago
<a href="http://freshmeat.net/redir/gbootroot/3075/url_rpm/gbootroot.i386.rpm">
Red Hat and related distributions</a><br>
<em>Instructions:</em><br>
Mandrake-type distribution require <b><code>perl-GTK >= 0.7002</code></b><br>
Red Hat type distributions require <b><code>Gtk-Perl >= 0.7002</code></b><br>
All RPM based distributions require perl-Expect and friends available from the main repository:<br>
<b>Perl 5.8 Series</b>
<ul>
<li><a href="http://prdownloads.sourceforge.net/gbootroot/perl-Expect-1.15-1.i386.rpm">perl-Expect</a>
<li><a href="http://prdownloads.sourceforge.net/gbootroot/perl-IO-Tty-1.02-1.i386.rpm">perl-IO-Tty</a>
<li><a href="http://prdownloads.sourceforge.net/gbootroot/perl-IO-Stty-.02perl5.8-1.i386.rpm">perl-IO-Stty</a>
</ul>
<b>Perl 5.6 Series</b>
<ul>
<li><a href="http://prdownloads.sourceforge.net/gbootroot/perl-Expect-1.12-1.i386.rpm">perl-Expect</a>
<li><a href="http://prdownloads.sourceforge.net/gbootroot/perl-IO-Tty-0.04-1.i386.rpm">perl-IO-Tty</a>
<li><a href="http://prdownloads.sourceforge.net/gbootroot/perl-IO-Stty-.02-1.i386.rpm">perl-IO-Stty</a>
</ul>
Other requirements include:<br>
<code>
file<br>
ash<br>
lilo<br>
bzip2<br>
</code>
<P>
<h3>Add-ons</h3>
<p>
<b>Debian based distributions</b><br>
<a href="http://freshmeat.net/redir/make-debian-x11/18842/url_tgz/make-debian-x11.orig.tar.gz">
make-debian-x11 source (type make to install)</a><br>
<a href="http://freshmeat.net/redir/make-debian-x11/18842/url_deb/make-debian-x11_all.deb">
make-debian-x11 debian package</a>
<p>
<h3>Screenshots</h3>
<a href="images/screenshot2.jpg">1.3.6</a><br>
<a href="images/screenshot.jpg">1.2.13</a>
<p>
<p><a href="#links">links</a></P>
<p><a href="#contact">How to contact</a></P>
<h3>Documentation</h3>
<a href="#FAQ">FAQ</a>
<br><a href="#cli-help">CLI Help</a>
<br><a href="#template-help">Yard Template Help</a>
<P align="center">
<IMG ALT="" SRC="images/gbootroot.jpg">
</P>
<P align="center">
<b>How to Use gBootRoot's CLI</b></P>
It's recommended to use the GUI for prototyping, but if you already
have an existing template in your $HOME/.gbootroot/yard/template
directory you can reference it with "gbootroot --template
template_name" and this will create the corresponding root_fs in
/tmp/gboot_non_root_`id -u`/. If you want the root_fs to have a
different name use the --root-filename option. All these options and
more can be found with -h or --help or see the
<a href="#cli-help">reference</a>.
<P align="center">
<b>How to Use gBootRoot's GUI</b></P>
<P><IMG ALT="" SRC="images/gBS.jpg" align="right">Start gbootroot without
any command-line arguments. The most important button to
familiarize yourself with is the Submit button which starts the whole process;
dialogs are presented as the process continues asking you if you want to
continue &quot;OK&quot; or stop &quot;Cancel&quot;.</P>
<p>
The <u>first row</u> allows you to choose a Boot Method.
&nbsp;&nbsp;Clicking on the menu on the right selects the Boot Method.</p>
<P>The <u>second row</u> allows you to select the kernel for the Boot/Root set.&nbsp;&nbsp;You
may either use the file selector button on the right hand side, or you may
type in the location on the left hand side.</P>
<P>
The <u>third row</u> allows you to select the compressed filesystem you are
providing, using either of the two ways mentioned before. &nbsp;&nbsp;You may use a
pre-made root filesystem or you may create one using one of the Methods
provided in the Advanced Root Section.
</P>
<P>The <u>fourth row</u> allows you to select the device you want to use.&nbsp;&nbsp;The default
device is the first floppy disk - /dev/fd0.</P>
<p>
The <u>fifth row</u> allows you to choose the size of the device being used.&nbsp;&nbsp;The default size of 1440 assumes you are using a floppy drive
(Note: You may
want to experiment with 1722 which works fine with many floppy drives.), but
can be used with other sized devices like tape drives.&nbsp;&nbsp;Click on the
appropriate radio button to choose either gzip or bzip2 compression if the
program doesn't automatically detect it.</p>
<P align="center"><b>Verbosity Box</b></p>
<IMG ALT="" SRC="images/verbosity_box.jpg" align="right">
The <u>slider bar</u> on the right allows the output of the verbosity box
to be
changed from the highest (2) to the lowest setting (1) or to be turned off (0)
or on again.&nbsp;&nbsp;At times it may be advantageous to turn off the
verbosity box
since large quantities of output to this box may cause gbootroot to use too
much cpu power; however, output may still be found in the text file "verbose"
in /tmp/gboot_non_root_`id -u`.</p>
<br><br><br><br><br><br><br><br>
<p><P align="center"><b>
Using the Advanced Boot Section</b></p>
<p><IMG ALT="" SRC="images/ABS.jpg" align="right">
Libraries & Binaries & Modules check boxes:&nbsp;&nbsp;Turn off and on the
stripping of symbols.&nbsp;&nbsp;The stripping
behavior for libraries may be changed by clicking on the right mouse button
to change --strip-debug to --strip-all.&nbsp;&nbsp;Binaries default to
--strip-all and Modules default to --strip-debug.</p>
<p>
"Devel Device"&nbsp;&nbsp;If the device used for development is different than the
actual boot device, use this field to indicate that device.&nbsp;&nbsp;You will have to
run lilo -v -C brlilo.conf -r "device mount point" manually at a later time
on the actual boot device.</p>
<p>
"Opt. Device"&nbsp;&nbsp;Add devices to the boot disk which are necessary for the
kernel to function properly.&nbsp;&nbsp;Put a space between each
device.&nbsp;&nbsp;For instance, /dev/fb0 for frame buffer devices.</p>
<p>
"append ="&nbsp;&nbsp;Add append options to brlilo.conf.&nbsp;&nbsp;If you are using a frame
buffer device you could add something like video=matrox:vesa:402,depth:16.</p>
<p>
"Kernel Module"&nbsp;&nbsp;Add the modules found in
/lib/modules/kernel-version which are necessary for the Boot Method to work
properly.&nbsp;&nbsp;If these modules aren't found in the modules directory
it is assumed
that they either are in the kernel or they do not exist.&nbsp;&nbsp;In the
case of 2 disk compression, floppy needs to be included in the
kernel or included as a module. &nbsp;&nbsp;Kmod inserts the modules, and
kmod needs to be built into the kernel along
with initrd and ramdisk."</p>
<p>
"Kernel Version"&nbsp;&nbsp;Override the kernel version number found in the
kernel header.&nbsp;&nbsp;This will change the /lib/modules/kernel-version
directory.</p>
<p>
System.map:&nbsp;&nbsp;When a non-running kernel is chosen it is important
to include a copy of that kernel's System.map file so that depmod can use
the correct set of kernel symbols to resolve kernel references in each
module.&nbsp;&nbsp;This can be found in the kernel's source code after
compilation.
<br><br><br><br><br><br><br>
<P align="center">
<b>Using the Advanced Root Section</b></P>
<p><IMG ALT="" SRC="images/ARS.jpg" align="right">
"Root Device"&nbsp;&nbsp;This is the device used for the root filesystem when
constructing the Boot/Root set.&nbsp;&nbsp;You may choose a device which is
different
than the Boot device, but presently only floppy devices are supported.</p>
<p>
"Root Device Size"&nbsp;&nbsp;The size of the actual media used for the Root Device.</p>
<p>
"Root Filename"&nbsp;&nbsp;The name give to the root filesystem when
initially made in the temporary creation location.&nbsp;&nbsp;The save
button allows the creation to
be saved in the permanent default location when the
Accept button is pressed.</p>
<p>
"Filesystem Size"&nbsp;&nbsp; Root Methods make the filesystem the size
which is specified here.</p>
<p>
"Filesystem Box"&nbsp;&nbsp;Allows the filesystem type, uml behavior, and
permissions to be controlled.&nbsp;&nbsp;There is a lot more information about
this box in the "Filesystem Box" section.</p>
<p>
"Compression"&nbsp;&nbsp;Off by default to allow user-mode-linux
testing.&nbsp;&nbsp;Turn on
compression when you are ready to use a Boot Method
which requires compression.</p>
<p>
"Method"&nbsp;&nbsp;The root filesystem creation method.</p>
<p>
"Template"&nbsp;&nbsp;The template associated with a Root
Method.&nbsp;&nbsp;Not all Root Methods
have templates.</p>
<p>
"Generate"&nbsp;&nbsp;This puts the chosen Root Method in action.</p>
<p>
"UML"&nbsp;&nbsp;Abbreviation for user-mode-linux.&nbsp;&nbsp;This is a
linux kernel which runs on
top of the host system's linux kernel and allows a you run a live root
filesystem.</p>
<p>
"Accept"&nbsp;&nbsp;This accepts the created root filesystem if it is
found in the
temporary creation directory.&nbsp;&nbsp;The UML box and the main section
will now
reflect the path to this root filesystem.&nbsp;&nbsp;You can now test with
the UML
button or a put together a complete Boot/Root set with the Submit button.</p>
<br><br><br><br><br><br><br>
<p><P align="left"><b>User Mode Linux Box</b></p>
<p><IMG ALT="" SRC="images/uml_box.jpg" align="center"></p>
<p>
"Xterm"&nbsp;&nbsp;Choose an xterm with its executable options switch.</p>
<p>
"mconsole:"&nbsp;&nbsp;Allow you to pass the help, sysrq, config, and remove
commands to the mconsole to control the Linux virtual machine specified
with the umid value.&nbsp;&nbsp;Good information about sysrq is found in
Documentation/sysrq.txt in the Linux sources.
<pre>
sysrq (Shows sysrq option values in virtual machine.)
sysrq [0-9|b|e|i|l|m|p|r|s|t|u]
cad
reboot
halt
config &lt;dev&gt;=&lt;config&gt;
remove &lt;dev&gt;
switch &lt;umid&gt;
version
help
</pre>
<p>
"Options"&nbsp;&nbsp;Enter uml command-line options like: <code>mem=64,
devfs=nomount</code>.&nbsp;&nbsp;The <code>umid</code> option is used by
23 years ago
Reboot, Halt, and the mconsole to determine which Linux virtual machine is
running.&nbsp;&nbsp;The umid value may be changed by
altering the value for the <code>switch</code> option in the mconsole entry
box to allow control of a different Linux virtual machine.
</p>
<pre>
umid=bootroot
mconsole: switch bootroot2 [Enter]
mconsole: sysrq s sysrq u sysrq b [Enter]
mconsole: switch bootroot [Enter]
</pre>
<p>
"Root_Fs"&nbsp;&nbsp;Choose an uncompressed root
filesystem.&nbsp;&nbsp;Append with ubd?=.</p>
<p>
<!--
Default sizes are chosen for mtdram's memory (mem) and
ramdisk size (ramdisk_size) requirements, and blkmtd's memory requirements.
These can be altered by passing the appropriate option to the
kernel.
-->
<u>MTD Emulator</u>
<p>
"On or Off"&nbsp;&nbsp;Turn MTD emulation on or off.
<p>
"mtdram"&nbsp;&nbsp;Use memory to emulate test mtd device.
<p>
"blkmtd"&nbsp;&nbsp;Use block device to emulate test mtd device.
<p>
"total size"&nbsp;&nbsp;Choose the total size for the mtd device.
<p>
"erasure size"&nbsp;&nbsp;Choose the erasure size for the mtd device.
<p>
Notes:&nbsp;&nbsp;
<ul>
<li>Choose a filesystem type which corresponds with the root filesystem image.
<li>
The initrd uses pivot_root which means that the root filesystem must have
chroot in order for the filesystem to properly boot.
<li>
The program automatically determines an optimal memory size (mem=nn[KMG]) to
allow mtdram or blkmtd to work properly.&nbsp;&nbsp;This value may be
overridden by
manually adding the mem parameter to the Options section in the
23 years ago
UML Box; likewise this value may be reinstated by removing the mem parameter
from the Options section.
<li>
Runlevels are determined in this order: mtd_init parameter
passed as a user option, runlevel passed as a user option,
root filesystem's /etc/inittab's initdefault, or the default of <em>/sbin/init 2</em>.
<li>
mtd_init=[Kernel start-up parameter]
<br>
example:&nbsp;&nbsp;mtd_init=/bin/bash
</ul>
<p>
<u>Lower Button Bar</u>
<p>
"Reboot"&nbsp;&nbsp;Passes the reboot command to the mconsole to reboot the
Linux virtual machine.
<p>
"Halt"&nbsp;&nbsp;Passes the halt command to the mconsole to halt the
Linux virtual machine.
<p>
"Abort"&nbsp;&nbsp;Abort user-mode-linux kernel processes.&nbsp;&nbsp;Should
be used as a last resort when Halt fails.</p>
<p><P align="left"><b>
About the Yard Box</b></p>
<p><IMG ALT="" SRC="images/yard_box.jpg" align="center"></p>
The Yard Box is a Root Method which is "Generated" from the Advanced Root
Section after a Template is chosen.&nbsp;&nbsp;It has several
interesting features.
<p>
The check boxes at the bottom represent the different stages involved in
creating a root filesystem.&nbsp;&nbsp;The behavior of these stages
may be altered in
three ways: Edit->Stages->one-by-one (default) will perform each stage
sequentially, stopping between each stage, the user may continue the process
by pressing the Continue
button.&nbsp;&nbsp;Edit->Stages->continuous proceeds non-stop
through all the
stages.&nbsp;&nbsp;Edit->Stages->'user defined' allows the user to
choose any stages the user wants, and will then proceed through all the
chosen
stages.&nbsp;&nbsp;Choosing only 'Check', 'Links & Deps', 'Copy', and 'Create'
is a good example.</p>
<p><IMG ALT="" SRC="images/tests.jpg" align="center"></p>
<p>
The behavior of some of the stages may be
altered.&nbsp;&nbsp;For instance Alt-T allows
you to choose which tests to run on the newly created
root filesystem.</p>
<p><IMG ALT="" SRC="images/template_search.jpg" align="center"></p>
<p>
Press Alt-S to enable template text searching in either
direction.&nbsp;&nbsp;Find exact matches or ignore case with
the case sensitive check box.</p>
<p><IMG ALT="" SRC="images/file.jpg" align="center"></p>
<p>
Use Ctl-S to save changes to a template, Alt-A to save the
template with a new name, or Alt-N to create a new template.&nbsp;&nbsp;
bOOTrOOT will not allow read-only
templates (ex: Examples) or template links to be saved
with their own name; after you make changes to these kind of templates,
save them with a new name to preserve the changes.</p>
<p><IMG ALT="" SRC="images/settings.jpg" align="center"></p>
<p>
Edit->Setttings has two check boxes which allow you to turn on and off
the automatic NSS and PAM configuration files parsing behavior described
in detail in Example.yard and Example-Mini.yard.
<p><IMG ALT="" SRC="images/stripping.jpg" align="center"></p>
<p>
Edit->Settings->Stripping allows you to turn off/on stripping for
Libraries, Binaries, and Modules.&nbsp;&nbsp;--strip-all is the
default for binaries and libraries,
and --strip-debug is the default for modules; however libraries may
be changed to --strip-debug in the settings.</p>
<p><IMG ALT="" SRC="images/paths.jpg" align="center"></p>
<p>
23 years ago
Edit->Setting->Paths allows you to prepend a new search path to gbootroot's
environment $PATH variable.
</p>
<p><IMG ALT="" SRC="images/replacements.jpg" align="center"></p>
<p>
Edit->Replacements in your $HOME/.gbootroot/Replacements directory using
an editor of your choice.
</p>
<p><IMG ALT="" SRC="images/create.jpg" align="center"></p>
<p>
Create->Replacements creates special replacement
files.&nbsp;&nbsp; Presently it creates
a fstab configuration file as Replacements/etc/fstab.new in
$HOME/.gbootroot/yard/.</p>
<P align="left">
<b>Filesystem Box</b></P>
<p><IMG ALT="" SRC="images/filesystem.jpg" align="center"></p>
The Filesystem Box (Edit->'File System") is the control center for access to
the filesystem making utilities provided by the root_fs helper.&nbsp;&nbsp;
For normal users it defaults to genext2fs, and for root, mke2fs.&nbsp;&nbsp;
If a normal
user sets the filesystem size greater than 8192k before the box is opened then
UML Exclusively is turned on, and mke2fs is assumed, otherwise it is off
and genext2fs is used.&nbsp;&nbsp;
UML Exclusively is off by
default for root, and allows root to create filesystem on a loop device, but
normal users don't have loop device access so genext2fs is used instead to
create a UID/GID 0 fs.&nbsp;&nbsp;Both types of users can turn this button on
at any time regardless of the filesystem size, and assuming they provide a
filesystem command supported by the root_fs helper; however, normal users
should keep this on when the filesystem
size is greater than 8192k.&nbsp;&nbsp;Preserve Ownership is off by
default for normal
users, and on by default for root, these are good defaults since a normal
user would create a fs with their own UID/GID if they turned this on.
<p>
The root_fs helper provides support for these commands:<br>
<code>mke2fs mkreiserfs mkcramfs genromfs mkminix mkfs.jffs2 mkfs.jffs</code>
<p>
Notes:
<ul>
<li>All these commands may have options added, but it is unnecessary to add
directory, device, or source options.
<li>Mkcramfs, genromfs, mkfs.jffs2, and mkfs.jffs take the Root Filename in the
ARS to produce an ext2 filesystem which is then used to store the sources used
to produce the actual filesystem.&nbsp;&nbsp;The new filesystem produced
is named respectively with _cramfs, _romfs, _jffs2, or _jffs appended to the
original Root Filename.&nbsp;&nbsp;
If in doubt
what this all means, watch the verbosity box when the filesystem is created,
and things should become more clear.
</ul>
<br>
<br>
<P><IMG ALT="" SRC="images/gBSicon.jpg" align="center"> <b>FAQ</b></P>
<a name ="FAQ">
<tt>
<a href="#1">1.</a> What's the advantage of using this program?
<p>
<a href="#2">2.</a> How do I use gBootRoot?
<p>
<a href="#3">3.</a> Oops, I can't get something to work, what should I do?
<p>
<a href="#4">4.</a> What are all these CVS directories doing in my replacements?
<p>
<a href="#5">5.</a> Can I use a program linked to uClibc in the template?
<p>
<a href="#6">6.</a> What do you mean by macro distribution?
<p>
<a href="#7">7.</a> How am I able to create root filesystems as a normal user?
<p>
<a href="#8">8.</a> How does this program allow a normal user to create a root filesystem larger than 8192k?
<p>
<a href="#9">9.</a> How can I create boot disks as a normal user?
<p>
<a href="#10">10.</a> What is make_debian, and how do I use it?
<p>
<a href="#11">11.</a> My root filesystem doesn't start in single mode when started like this: "bootdisk 1?"
<p>
<a href="#12">12.</a> What does the 2 disk compression method do?
<p>
<a href="#13">13.</a> I've created a root fs.&nbsp;&nbsp;Then I've tried to create the boot disk using the 2 disk compression method.&nbsp;&nbsp;The device selection is /dev/fd0, size is 1440k, but the initrd_image.gz is 715k.&nbsp;&nbsp;I don't know much about boot disks but shouldn't the boot disks contain mainly the kernel?
<p>
<a href="#14">14.</a> If libc is included in the boot disk, why is it needed in the root disk as well?
<p>
<a href="#15">15.</a> So if I understand correctly, it is not possible to copy libc from dev/ram0 to /dev/ram1 before mounting /dev/ram1 as / ?
<p>
<a href="#16">16.</a> There isn't enough room left on my 1440 floppy to make a Boot or Root disk.&nbsp;&nbsp;Is there any way to free up more space apart from reducing the size of the kernel?
<p>
<a href="#17">17.</a> Last, but not least...the boot disk boots, waits for the root disk, and now fails. "Can't open console"??? or sth like this (I'm pretty tired right now, recheck later), which appears after "VFS:ext2fs was found..."
<p>
<a href="#18">18.</a> What are the kernel's drivers/fs that must be directly compiled, not as modules, except ext2, floppy? Could you attach your kernel's .config?
<p>
<a href="#19">19.</a> What is the root_fs_helper 2Mb file in the grootboot package?
<p>
<a href="#20">20.</a>
Now the creation works, but actually the whole image is less than 1440k... Still, unclear to me is the purpose of the device/size in the main widget - is it only for the boot or also for the root disk? After all, the root fs image size has been already entered in the ARS.
<p>
<a href="#21">21.</a> gBootRoot doesn't start because it can't locate Gtk.pm?
<p>
<a href="#22">22.</a> If you roll the floppy density counter down to 0 and then try go back up towards 1440 and 1722, you get very funny figures.
</a>
<p>
<a href="#23">23.</a> Changing from gz to bz2 compression for the boot image in the main section has no effect and gzip is still executed.
<p>
</tt>
<P><a name="1"><b>What's the advantage of using this program?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></P>
<P><A href="./bootroot.html">BootRoot</A> was the original program,
but I decided that a GUI approach provided the user much more
versatility and power in creating distributions.&nbsp;&nbsp;Since the
first gBootRoot, bOOTrOOT has become a full blown distribution
creation program which may be used by a normal user. It may be used
for the creation of root filesystems in every imaginable application
from Embedded Systems to Mini Distributions to Macro distributions to
Full sized Distributions.&nbsp&nbsp;The root and boot filesystems may
be tested long before implementation by using
user-mode-linux.&nbsp;&nbsp; Boot Methods are provided to allow root
filesystems to run from different types of media.&nbsp;&nbsp;
Historically, developers have written scripts which have focused on
providing a particular type of root filesystem and boot
method.&nbsp;&nbsp;Observation reveals that all these approaches share
many commonalities.&nbsp;&nbsp;gBootRoot has been designed to embrace
these similarities, and to allow developers to create drop-in methods
via modules or easy to understand templates.&nbsp;&nbsp; gBootroot is
the GIMP of distribution creation!</P>
<P><a name="2"><b>How do I use gBootRoot?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></P>
Learn how from this tutorial that focuses primarily on the Yard
Method:
<p>
<u>Test an existing mini distribution.</u>
<p>
Run gbootroot.&nbsp;&nbsp;Click on the Advanced Root Section (ARS),
click on the UML button. &nbsp;&nbsp;Select
/usr/lib/bootroot/root_filesystem/root_fs_helper, and click on the
Submit button.</p>
<u>Test a macro distribution created by make_debian-X11.</u>
<p>
Download <a
href="http://sourceforge.net/project/showfiles.php?group_id=9513">
root_fs_debian_x11-(latest revision).bz2</a>.&nbsp;&nbsp;Then follow
the instructions in "Test an existing mini distribution." This root
filesystem was created with the make_debian-X11 script from the
make-debian-x11 add-on found at <a
href="http://sourceforge.net/project/showfiles.php?group_id=9513">
gbootroot's</a> Sourceforge home.</p>
<u>Make your own micro distribution from an existing template.</u>
<p>
Click on the ARS if its not already opened.&nbsp;&nbsp; Choose Yard
from the Method pull-down menu.&nbsp;&nbsp;Choose
<b>Example-Mini.yard</b>
from the pull-down Template menu.&nbsp;&nbsp;Click on the Generate button.
&nbsp;&nbsp;The Yard Box will pop up.&nbsp;&nbsp;Click on the Continue button
23 years ago
until the Create check box turns off.&nbsp;&nbsp;You could continue to the
tests, but they really wouldn't apply to this minimalistic example because
there are no links or login type files in the template.</p>
<p>
Experiment with Edit->Stages from the Yard Box menu. &nbsp;&nbsp;Try
different types of staging behavior, and notice the differences.</p>
<p>
Test your creation with the UML box. &nbsp;&nbsp;You will want to add
init=/bin/bash to the Options entry.</p>
<p>
At this point you will probably want to play around a little
bit.&nbsp;&nbsp;Familiarize yourself with the Format Rules found near
the top of the template.&nbsp;&nbsp;You may want to save the template
with a different name and experiment with changes, or create a new
template using File->New (Shortcut: Alt-N).</p>
<u>Make your own mini distribution from an existing template.</u>
<p>
Choose <b>Example.yard</b> from the Template menu in the ARS.
&nbsp;&nbsp;Save it with a new name.</p>
<p>
There are two types of inittabs provided for each major distribution
type.&nbsp;&nbsp;The inittab with nodevfs appended doesn't use the
device fs, i.e. the devfs=nomount kernel option.</p>
<p>
Example.yard template introduces you to Replacements like the inittabs
described above.&nbsp;&nbsp; Replacements can be anywhere and are
specified in the template as either an absolute path or relative to
$PATH (Edit->Settings->Path); the default path location for
Replacements for users is $HOME/.gbootroot/yard/Replacements.
&nbsp;&nbsp;Also, this template introduces you to links, $VERSION, how
library dependencies are automatically figured for binaries and the
automated approach for finding service modules and dependencies for
PAM and NSS. &nbsp;&nbsp;Once you learn the format rules and how they
are interpreted by the program you will find that making your own
templates is quite simple.</p>
<p>
Click on the Continue button until you finish the Space Left
stage.&nbsp;&nbsp;Adjust the Filesystem Size in the ARS to a size
larger than the Total space shown in the verbosity
box.&nbsp;&nbsp;Create your root_fs, and make sure there was enough
room left.&nbsp;&nbsp;You may have to adjust the size and run Create
again if you are normal user, or run Copy and Create if a loopback
device is being used as root.</p>
<p>
Now that you have a root filesystem you may continue to the Test stage
and observe what is missing.&nbsp;&nbsp;Next run the root_fs from the
UML box.&nbsp;&nbsp; If things don't work correctly you will have to
hunt down the cause, make the appropriate changes and proceed through
the stages again.&nbsp;&nbsp If you only make a change to a
Replacement, you only have to run the Copy and Create stage
again.&nbsp;&nbsp;If you make a change to the template you have to run
at least the Check, Links & Deps, Copy, and Create stages again.</p>
<u>Make the mini distribution you just created with a different
filesystem type.</u>
<p>
Now that you have successfully created a working mini distribution
from Example.yard, re-create it with a different filesystem type:
ext2, ext3, minix, reiserfs, romfs, cramfs, jffs, or jffs2. For this
learning experience make sure you are running gbootroot as a normal
user .. you were already weren't you?
<p>
Open up the Filesystem Box (Edit->'File System") and click on the UML
Exclusively check button, and enter a filesystem command. For this
example <code>mkminix</code> will be used to create a minix
filesystem. &nbsp;&nbsp;Normal users will want to keep the Preserve
Ownership check button off.&nbsp;&nbsp;Press the submit button when
finished.
<p>
Adjust the Filesystem Size in the ARS larger than 8192k, you could
also make it smaller, but the point of this exercise is to introduce
users to how the 8192k barrier of genext2fs can be exceeded.
<p>
Set the staging behavior to user defined, and choose the Check, Links
& Deps, Copy, and Create buttons. Press Continue and observe what
happens.
<P>
Can we create a different filesystem type for the root filesystem we
just altered?&nbsp;&nbsp; Enter <code>genromfs</code> to create a
romfs filesystem.&nbsp;&nbsp; Set the staging behavior to user defined
if this hasn't already been done, turn on the Create check button, and
press the Continue button.&nbsp;&nbsp;Assuming you've left the ARS
open, press the UML button so that the UML box closes and reopens, and
you will notice that your fs has _romfs appended to it.&nbsp;&nbsp;Try
it out. &nbsp;&nbsp; You may notice complaints on boot-up about
ioctl.save, to remove these complaints you could create a replacement
ioctl.save, put it in
$HOME/.gbootroot/yard/Replacement/etc/ioctl.save, edit and save the
changes to the template, re-create the filesystem, and test again.
<p>
So what about devices for normal users?&nbsp;&nbsp; Genext2fs creates
devices for normal users, however, when UML Exclusively is used a
normal user doesn't have the capability to copy over devices from the
host system.&nbsp;&nbsp;Instead, devfs should be used.&nbsp;&nbsp; If
more devices are required, devfsd can be used to set them up after the
root filesystem is booted.&nbsp;&nbsp;Did you get things to
work?&nbsp;&nbsp; Congratulations, you have created a root filesystem
without needing to be root!&nbsp;&nbsp;
<p>
<u>Create a boot and root floppy for an existing mini distribution.</u>
<p>
Using the techniques you've learned, now create a root_fs which after
being compressed can fit onto a floppy drive disk. You compress your
root_fs by by turning compression on by pressing on the off check
button in the ARS. For maximum compression choose bz2, and then press
the Accept button.
<P>
Click the Submit button on the main box.&nbsp;&nbsp;Have two floppy
disks ready. Follow any additional instruction gbootroot may tell
you.
<p>
When you boot the boot disk you will see Lilo, you may access the menu
using [Ctrl] and [Tab] to see the available images, or wait for the
prompt to insert the root disk.</p>
<u>Make your own root filesystems from your own templates.</u>
<p>
Now that you have done your homework, I set you free to create your
own root filesystems from your own templates with replacements of your
own choice.&nbsp;&nbsp;Create a root_fs which can be used as an
emergency disk customized for your own system, or create your own
customized macro distribution and run it from the UML box to try
things you never would have dreamed of doing on your host
system.&nbsp;&nbsp;And that is just the beginning of the things you
can do.
<P><a name="3"><b>Oops, I can't get something to work, what should I do?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
If something isn't working for you, I want to know because you probably have
found a bug.&nbsp;&nbsp;Don't fall
into the trap that makes you believe that developers don't want to be deluged
with bugs, quite to the contrary. developers love to receive bugs,
and I heartily encourage all users to send Free Software developers all their
problems.&nbsp;&nbsp;
I have experience working in Quality Assurance, and I know that a
program with the complexity of gbootroot is a perfect recipe for
the existence of all types of bugs.&nbsp;&nbsp;As a developer focusing on the
deployment of code it is easy for bugs to slip by unnoticed.&nbsp;&nbsp;
Free Source software depends on users sending in bugs if the software is
to ever experience rapid development; users shouldn't leave this process
to the developers, because this guarantees that they will need to spend lots
of time in the testing phase rather than spending time adding great
new features.&nbsp;&nbsp;
<p>
<em>Testers Wanted!&nbsp;&nbsp;Big Reward!</em>
<p>
Just because a project doesn't have a name like "Linux" doesn't
mean that the project should live by itself without community support,
so please send in those bugs.&nbsp;&nbsp;
I consider a bug anything which effects the user negatively,
whether it is a user interface (UI) which is hard to understand
or use, documentation which seems misleading, or if the program doesn't
seem to deliver results as it should.&nbsp;&nbsp;Even if you think
your problem may be due to your own lack of understanding, I still
recommend that you contact me after reasonable attempts, because what
you may be experiencing is what "MANY" may be experiencing.&nbsp;&nbsp;At the
bottom of this page is the contact information.&nbsp;&nbsp;Your problem
will help gbootroot become a better program for all, and you will be a hero!
<P><a name="4"><b>What are all these CVS directories doing in my replacements?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<P>
CVS directories are deliberately put in the Replacement directories to
prevent users from making changes to global replacement files.&nbsp;&nbsp;
This allows developers who create add-ons (ex: make-debian-x11) to remain
confident that any changes made to
add-on replacements will remain available to all users.&nbsp;&nbsp;
Replacements
from add-ons are placed in the architecture-independent
/usr/share/gbootroot/yard/Replacements directory, and the
architecture-dependent /usr/lib/bootroot/yard/Replacements
directory.&nbsp;&nbsp;
When a user opens up gBootRoot, the program checks to see if there are any
new replacements and then creates symlinks from the
$HOME/.gbootroot/yard/Replacements directory to the
replacement repositories.&nbsp;&nbsp;
In general the repositories for replacements are owned by root, so normal
users can't make changes to these files; however, when root is
editing replacements in the $HOME Replacements location, it should be the
administrator's policy to use an editor which respects versioned files (i.e. Emacs).&nbsp;&nbsp;Then the
administrator will not be able to
make any changes to the replacements repository because the CVS directories
keep date information which prevents the editing of these
files.&nbsp;&nbsp;The files kept in /usr/lib are usually binary files
specific to the host architecture,
where as the files linked from /usr/share are often text files compatible
with any architecture; however,
this directory is meant to be used for data which shouldn't be modified
directly by any user
(see <a href="http://www.pathname.com/fhs/">FHS</a>).</p>
<p>
<em>Note for users of version 1.2.14 or earlier</em>: Versions of gbootroot
before 1.3.0 didn't have this set-up, instead there were just copies of add-on
replacements in the $HOME replacement directory to allow the user
to directly modify add-on replacements.&nbsp;&nbsp;
In order to get the full benefit of the new change you will need to
rename any of the $HOME/.gbootroot/yard/Replacements
you've modified and put them in a safe place, then remove the old
replacements, and return the renamed replacements.
<p>
<a name="5"><b>Can I use a program linked to uClibc in the template?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
Binaries are auto-magically checked to discover whether they require libc6 or
uClibc.&nbsp;&nbsp;If they are found to require uClibc
/usr/i386-linux-uclibc/bin/ldd
is used to discover shared library dependencies, otherwise ldd is
called without any path.</p>
<a name="6"><b>What do you mean by macro distribution?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
A macro distribution is a term I coined.&nbsp;&nbsp;It implies a software
distribution larger than a mini distribution usually
associated with 1.44 to 1.722 sized floppy disks, but smaller than a
base distribution which provides the foundation to create a full size
distribution.&nbsp;&nbsp;It is usually pruned, and provides the
absolute minimum needed to provide all the functionality usually
associated with a full sized distribution, yet it still uses the same
libraries and binaries.&nbsp;&nbsp;Because it can be made quickly, it is
useful for creating a current snapshot of ones own host systems, and can be
used to run experiments safely via user-mode-linux without fear of
corrupting the host system.</p>
<a name="7"><b>How am I able to create root filesystems as a normal user?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
Genext2fs is used to allow a normal user to create an ext2
filesystem with all UIDS and GIDS belonging to 0 (root) without the need for
a loop or ram device.&nbsp;&nbsp;Device nodes are created from a device table
file written to by gbootroot.&nbsp&nbsp;This program is authored by
Xavier Bestel, but the version used by gbootroot has
modifications from Erik Andersen (BusyBox) to allow a device table
to be used rather than a device listing.&nbsp;&nbsp;The maximum allowable size
for a filesystem is 8192k.&nbsp;&nbsp;User and group information
can be changed when the filesystem is run from a kernel.
<p>
<a name="8"><b>How does this program allow a normal user to create a root filesystem larger than 8192k?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
Although genext2fs only allows a normal user to create a UID/GID 0 root
filesystem up to a maximum size of 8192k, this program exceeds this barrier by
taking advantage of the unique characteristics of user-mode-linux, allowing
normal users to explore things they never could before.&nbsp;&nbsp;
User-mode-linux is used to boot up a root_fs helper, the program then
communicates with the user linux system via expect to automatically
create a UID/GID 0 filesystem from the files copied over from the
/tmp/gboot_non_root_`id -u`/loopback directory.&nbsp;&nbsp;The steps will
vary slightly depending on which filesystem command is chosen, however, the
same
concept is used.&nbsp;&nbsp;You may apply this to filesystems smaller than
8192 by adjusting the settings in the Filesystem Box.&nbsp;&nbsp;
If you want to learn how to do this manually, look at the ten steps below.
<p>
<em>The root_fs helper used by gbootroot is completely root-free</em>.
<p>
<u>Ten steps to manually make a >8192 fs as a normal user.</u>
<p>
1.&nbsp;&nbsp;You may want to create a helper root filesystem
(<=8192k), and give it an unique name in the
ARS Root Filename.&nbsp;&nbsp;The root_fs
created from Example.yard provides all the functionality you need,
regardless, you will need some sort of working root_fs with all the
necessary system utilities before proceeding with the next step.&nbsp;&nbsp;
We will call this root_fs_helper.
<p>
2.&nbsp;&nbsp;Create your root filesystem (>8192k) as you normally would when
using
genext2f, making sure to choose the filesystem size you require from
the ARS.&nbsp;&nbsp;
Proceed through the required stages, and when you finish the Create stage
an ERROR dialog box will pop up saying "Cannot genext2fs
filesystem" which you can safely ignore.&nbsp;&nbsp;At this point in the
"echo /tmp/gboot_non_ root_`id -u`" directory there is an empty file
with the name
specified in the ARS Root Filename field which we will assume is called
root_fs.&nbsp;&nbsp;Above this directory
in loopback/ all files and directories copied over during the Create stage
can be found.
<p>
3.&nbsp;&nbsp;Open up the UML box from the ARS.&nbsp;&nbsp;In the Root_Fs
entry ubd0 should be pointing to the helper root_fs, and
ubd1 should be pointing to the empty root_fs file:&nbsp;&nbsp;
<pre>
ubd0=/tmp/gboot_non_root_1000/root_fs_helper ubd1=/tmp/gboot_non_root_1000/root_fs
</pre>
</p>
<p>
4.&nbsp;&nbsp;The devfs is used in this example.&nbsp;&nbsp;
Press the Submit button on the UML box, and login to
the root_fs_helper.&nbsp;&nbsp;Create two mounting directories if they
don't exist.&nbsp;&nbsp;For this example, /mnt1 and
/mnt2 are used.&nbsp;&nbsp;
<p>
5.&nbsp;&nbsp;Make a filesystem type of your own choice on /dev/ubd/1:
<pre>
mke2fs -m0 /dev/ubd/1
</pre>
<p>
6.&nbsp;&nbsp;Mount /dev/ubd/1 on /mnt1:
<pre>
mount /dev/ubd/1 /mnt1
</pre>
<p>
7.&nbsp;&nbsp;Mount the host filesystem on /mnt2:
<pre>
mount -t hostfs none -o /tmp/gboot_non_root_1000/loopback /mnt2
</pre>
<p>
8.&nbsp;&nbsp;Copy everything from loopback to /mnt1:
<pre>
cp -a /mnt2/* /mnt1
</pre>
<p>
9.&nbsp;&nbsp;Change UIDs and GIDs to the appropriate user:
<pre>
chown -v -R 0:0 /mnt1
chown -v -R 1002:1002 /mnt1/home/user
</pre>
<p>
10.&nbsp;&nbsp;Unmount everything.&nbsp;&nbsp;Root_fs is now ready to be used!
<p>
<a name="9"><b>How can I create boot disks as a normal user?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
Make the boot disk as you normally would.&nbsp;&nbsp;As long as you have
write permissions to the boot device you shouldn't run
into a problem.&nbsp;&nbsp;However, not all boot loaders
can be set-up as a non-root user, but, you may still continue to
the end of the process and set-up the boot loader later from a machine you
have root access on.&nbsp;&nbsp;In order to use lilo while running
gbootroot there
are two prerequisites your administrator will have to establish for you.
First, he will have to edit the fstab to allow you to mount a certain
block device.&nbsp;&nbsp;For instance, to allow you to mount /dev/fd0, you
have to mount the /tmp/gboot_non_root_mnt_`id -u` directory.&nbsp;&nbsp;If
your UID is 1000, then a line like this is added to the fstab:
<pre>
/dev/fd0 /tmp/gboot_non_root_mnt_1000 auto defaults,user,noauto 0 0
</pre>
<p>
Next, the administrator needs to give you access to the
lilo command.&nbsp;&nbsp;Sudo is a good solution, and in gbootroot the
$main::sudo variable is assigned "sudo", this can be changed by the
administrator to some other sudo-like program.&nbsp;&nbsp;The administrator
then uses visudo to edit the sudoers file with a line like this:
<pre>
user hostname = NOPASSWD: /sbin/lilo
</pre>
<p>
Note that NOPASSWD is used.&nbsp;&nbsp;Gbootroot won't prompt for a password,
and just assumes no password in necessary.&nbsp;&nbsp;I could change this
behavior if people request it.&nbsp;&nbsp;If modules are required for
the boot method to work properly, you need to have read
permissions to them so they can be copied.&nbsp;&nbsp;Now a bootdisk with
lilo can be made.
<p>
<a name="10"><b>What is make_debian, and how do I use it?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
Make_debian is a script which takes information from
a Debian installation and creates a template which can be used to make a
macro distribution using gBootRoot's yard method.&nbsp;&nbsp;
It creates replacements for important configuration files to represent
the actual packaging state it will be providing.&nbsp;&nbsp;
In order to use this script you need to be running a Debian-like
distribution, anotherwards, one which uses dpkg, apt and file-rc to maintain
its packaging and boot hierarchy.&nbsp;&nbsp;Dswim is used to collect
information used in making the template.&nbsp;&nbsp;When you run the
template in the Yard Box as
a normal user make sure that UML Exclusively is on in the filesystem box, and
that you assign an adequate filesystem size in the ARS.&nbsp;&nbsp;This is a
good opportunity to find out how your installation would run on top of
different filesystem types like reiserfs.</p>
<p>
Run make_debian from the command-line.&nbsp;&nbsp;The script first finds all
required packages on your host system, then it checks to see if any of
the extra packages mentioned in its configuration are missing.&nbsp;&nbsp;
As a rule, even if extra packages
are missing, a working distribution will still be created.&nbsp;&nbsp;
The script will then ask you a few questions,
and then proceed to make Debian-`uname -n`.yard in your template
directory.&nbsp;&nbsp;
<p>
<em>Extra Packages and static template data:</em>
<br>
You can resolve missing packages by installing them on your system, or you can
edit the script and replace those packages with a suitable replacement,
since you may be using a different version of Debian than the author
used when putting together make_debian.&nbsp;&nbsp;Make a copy of make_debian,
and then edit the part under EDIT HERE between qw().&nbsp;&nbsp;
You may edit the static data for the template within the script where it says
EDIT TEMPLATE BELOW.&nbsp;&nbsp;
The <b>make-debian-x11</b> add-on is actually the
result of
making these modifications.&nbsp;&nbsp;First, extra packages were
added, second, extra replacements were provided and the static information
in the template was modified to reflect these replacements.
</p>
<a name="11"><b>My root filesystem doesn't start in single mode when started like
this:&nbsp;&nbsp&quot;bootdisk 1?&quot;</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></P>
<P>
When you start a kernel image with 1, you are telling it to start in runlevel
1, not in single mode.&nbsp;&nbsp;Use "single" instead.</p>
<p>
While on the subject, it should be pointed at the setting up init and its
runlevels is one of the
most challenging areas of creating a bootable root_fs.&nbsp;&nbsp;Often
your creation will only work with "single" until all the conflicts
are resolved.&nbsp;&nbsp;Things are complicated even further by the fact that
devices can now be set up in two majors ways: tty? or ttys/? (devfs).
&nbsp;&nbsp;Fortunately, user-mode-linux comes in very handy for hunting
down all the bugs.
</P>
<P><a name="12"><b>What does the 2 disk compression method do?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></P>
<P>This Boot Method creates a boot disk with lilo, a kernel and an initrd
image.&nbsp;&nbsp;
The initrd script mounts another root disk with a compressed (gzip or bzip2)
filesystem.&nbsp;&nbsp;Note: This method doesn't use the devfs, so use a
kernel without this built into it.</P>
23 years ago
<p><a name="13"><b>I've created a root fs.&nbsp;&nbsp;Then I've tried to create the boot disk using the 2 disk compression method.&nbsp;&nbsp;The device selection is /dev/fd0, size is 1440k, but the initrd_image.gz is 715k.&nbsp;&nbsp;I don't know much about boot disks but shouldn't the boot disks contain mainly the kernel?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
If you are creating a boot disk in which the kernel knows where to
find the root filesystem and the root filesystem is
either compressed with gzip or not compressed (i.e. a cramfs could be used),
then nothing else but a kernel is required
23 years ago
assuming it is copied in a way that is starts at block 0 on the device
media, and then rdeved in such a way that it knows that the ramdisk and the
prompt
flag are on, i.e., rdev -r /dev/fd0 49152, and that the root filesystem starts
at block
0 on the other floppy.&nbsp;&nbsp;
However, the 2 disk compression method was designed to uncompress bzip2
root filesystems as well as gzipped root filesystems from
to the second disk.&nbsp&nbsp;In order to boot /dev/fd0 from /dev/fd0 when
the root
filesystem is compressed with bzip2 the kernel has to
mount the initial boot disk, and then after the new root disk is inserted it
uncompresses the root filesystem and then changes over to the real root
device,
which in this case is /dev/ram1 where the uncompressed filesystem now
resides.
&nbsp;&nbsp;
In order to accomplish this a customized ramdisk called an initrd is
23 years ago
required.&nbsp;&nbsp;
Initial ram disks are essentially mini filesystems with the
bare necessities to allow a special init type file called linuxrc to
perform similar types of duties as an init, but in a much more esoteric
fashion than
an init.&nbsp;&nbsp;
During a kernels initrd stage it looks for linuxrc, and during
normal boot it looks for init or a specified init passed as an option to
the kernel.
<p>
So you are probably wondering what all this has to do with the large initrd
size when using the 2 disk compression method.&nbsp;&nbsp;
Linuxrc can be anything from a statically-linked executable to a script
23 years ago
which requires the dynamically-linked ash executable.&nbsp;&nbsp;
In the case of the 2
disk compression method, the later method is employed, and this uses
information found directly from your host system.&nbsp;&nbsp;You may have
noticed
the libraries required by ash found from your host system
can be quite large even after being stripped assuming you are using a major
distribution or derivative of
one.&nbsp&nbsp;
The advantage of a two disk boot/root
system is related to the fact that modern kernels are themselves quite
large, leaving very little room for a root filesystem, but at the same
time it is convenient to have a boot loader like lilo because it allows
you to boot other root filesystems which is useful in emergency
situations.&nbsp;&nbsp;
23 years ago
The present ABS
(boot section) is descended from some pretty old historic code from the
original bootroot and is due
for a major upgrade to allow a lot more flexibility in creating
streamlined boot disks from a variety of user definable methods.
Unfortunately (or fortunately for root filesystem making, a process which
used to take days), I've been devoting a lot of time to the ARS, but
hopefully I'll be adding major changes to the ABS in the near future.
<p>
<a name="14"><b>If libc is included in the boot disk, why is it needed in the root disk as
well?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></P>
<p>
An interesting question.&nbsp;&nbsp;Let's consider the two disk compression
method,
first the initrd is decompressed into /dev/ram0 or /dev/rd/0, then the
root filesystem is decompressed into /dev/ram1 or /dev/rd/1, even though
one would think since everything is being done in memory, the presence of
the libraries would remain in memory.&nbsp;&nbsp;But, in this case memory is
partitioned and the new root device doesn't share information with
the previous root device.&nbsp;&nbsp;An easier way to look at this is simply
that a
new root is being used which doesn't share information with the previous
root.&nbsp;&nbsp; You can experiment with this by removing libc-*.so and
ld-*.so from a root filesystem which previously worked, first test it with
UML, and then try to boot it; in both cases it won't work.
<p><a name="15"><b>So if I understand correctly, it is not possible to copy libc from /dev/ram0 to /dev/ram1 before mounting /dev/ram1 as / ? </b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
Actually, this could be accomplished before the change_root or pivot_root
call, however, there is a much easier solution.&nbsp;&nbsp;
Make a working root
filesystem, edit it either on a loop device as root, or on a different
ubd?=root_fs as any user from a Linux virtual machine.&nbsp;&nbsp;
Add an initrd
device to the mounted filesystem with <code>mknod initrd b 1 250</code>
in the /dev
directory.&nbsp;&nbsp;
Make a directory called /initrd.&nbsp;&nbsp;
Delete libc*so and then
<code>ln -sf /initrd/lib/libc(real version)so libc(real version)so</code>.&nbsp;&nbsp;
Umount, compress, and copy
over to your root disk (2 disk compression method - make sure compression
and filesystem name match).&nbsp;&nbsp;
The reason why this works is that the initrd
remains mounted if /dev/initrd and the directory /initrd exist on the root
filesystem after the root change.&nbsp;&nbsp;
Ofcourse, you won't be able to run the
filesystem without the initrd, but this is another great way to save
space.
<p><a name="16"><b>There isn't enough room left on my 1440 floppy to make a Boot or Root
disk.&nbsp;&nbsp;Is there any way to free up more space apart from reducing
the size of the kernel?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
Move the device size to 1722. This is a trick that <a href="http://www.toms.net/rb/">tomsrtbt</a> uses on his famous rescue disk.</p>
<p>
(Update 10/06/2001) <br>
Up until mke2fs version 1.19 you were able to do
`mke2fs -F /dev/fd0 1722` on a 1440 device without any problem, but since
then mke2fs has become much more particular about enforcing actual device
size. .&nbsp;&nbsp;Mke2fs will complain:</p>
<p>
"mke2fs: Attempt to write block from filesystem resulted in short write
zeroing block 1600 at end of filesystem."</p>
<p>
I understand Theodore Ts'o reasoning for doing this, but I strongly believe
that the old behavior was very useful for people creating
mini-distributions so I have issued
<a href="
http://sourceforge.net/tracker/index.php?func=detail&aid=468652&group_id=2406&atid=352406">Feature Request #468652</a> at e2fsprogs site
at Sourceforge.&nbsp;&nbsp;It should
be noted that fdformat is an unacceptable solution because it tends
to be machine specific, and the original mke2fs behavior made floppies that
worked
everywhere.&nbsp;&nbsp;Feel free
to add your comments to the Feature Request.&nbsp;&nbsp;Thanks.</p>
<p>
<a name="17"><b>Last, but not least...the boot disk boots, waits for the root disk, and
now fails. "Can't open console"??? or sth like this (I'm pretty tired
right now, recheck later), which appears after "VFS:ext2fs was found..."</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></P>
<p>
This is an easy one.&nbsp;&nbsp;First, make sure that there is a
/dev directory in
your root filesystem.&nbsp;&nbsp;Genext2fs will automatically make this
from its devices table, but other fs creators (mke2fs) don't know any better.
Second, does your kernel have devfs?&nbsp;&nbsp;Based on this answer,
make sure you choose the proper inittab for your kernel, and if you aren't
using devfs
make sure that the proper devices are included.&nbsp;&nbsp;The minimum
required is /dev/console and you will need devices for anything listed
in the inittab.
Genext2fs will include devices for any user, but non-root users can't
create devices with other filesystem creators.&nbsp;&nbsp;Third, test
with UML, if the filesytem is not devfs use the devfs=nomount option
to make sure your filesystem is running properly.
<p>
<a name="18"><b>What are the kernel's drivers/fs that must be directly compiled, not as
modules, except ext2, floppy?&nbsp;&nbsp;Could you attach your
kernel's .config?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></P>
<p>
I don't want to take all the fun away from you.&nbsp;&nbsp;However, floppy
can be a module for the two disk compression method.&nbsp;&nbsp;Boot methods
automatically check for the existence of required modules, otherwise,
they are assumed to be part of the kernel.&nbsp;&nbsp;If you peruse the
verbosity box the required modules are revealed.&nbsp&nbsp;INITRD and
BLK_DEV_RAM should be in the kernel if an initrd is being used.&nbsp;&nbsp;
23 years ago
In general, if an initrd or root filesystem require a certain filesystem type,
23 years ago
that filesystem type needs to be built into the kernel, and can't be a
23 years ago
module.&nbsp;&nbsp;
There is a config for the uml kernel in
/usr/lib/bootroot/yard/Replacements/lib/modules.&nbsp;&nbsp;If you get
it running with uml, and it doesn't run with your own kernel, take a look
here.
<p>
<a name="19"><b>What is the root_fs_helper 2Mb file in the grootboot package?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></P>
<p>
This is the ultimate in root filesystem engineering.&nbsp;&nbsp;The root
filesystem helper is actually a much bigger filesystem made with cramfs, and it
originated from a genext2fs filessytem made as a normal user.&nbsp;&nbsp;
It includes
utilities like filesystem creators.&nbsp;&nbsp;It is part of the automated
filesystem creation system, and after it is booted by uml, it is
interacted with via expect based on user choices placed in the filesystem
box.&nbsp;&nbsp;Considering that mkreiserfs doesn't allow loop devices to
be used,
this is an easy way to get around this limitation, and most importantly it
allows non-root users to create UID/GID 0 root filesystems.&nbsp;&nbsp;
Try creating a root filesystem as a normal user with both "UML Exclusively" and
"Preserve Ownership" turned on and discover if you can successfully create
a working root filesystem.&nbsp;&nbsp;Answer: No, you will not be able
to unless Preserve Ownership is off.
<p>
<a name="20"><b>Now the creation works, but actually the whole image is less than
1440k... Still, unclear to me is the purpose of the device/size in the
main widget - is it only for the boot or also for the root disk?&nbsp;&nbsp;
After all, the root fs image size has been already entered in the ARS.</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></P>
<p>
Gbootroot is designed with the idea that new Linux users don't need to
open up the ARS or ABS; basically, they just choose a boot method, provide
a pre-made compressed root_fs and kernel, and then press the submit button
to get a two disk floppy system.&nbsp;&nbsp;What this means is
that if the ARS is
never opened then the boot and root devices will both be /dev/fd0.&nbsp;&nbsp;
But, if the ARS is opened up, then the boot device is whatever is found in the
main section, and the root device is whatever is found in the ARS.&nbsp;&nbsp;
Likewise, if the ABS is opened up, and the user decides that they would like
to do
development work on a different device than the boot device, for instance,
/dev/fd1, then they can change the device in the ABS.&nbsp;&nbsp;In this
case, the
device should be left to /dev/fd0 in the main section, unless you have one
of those amazing Bioses which allow /dev/fd1 to be booted.&nbsp;&nbsp;
At a later
date the user can run "lilo -v -C brlilo.conf -r /mnt" where /mnt
represents the mounted device provided in the main section.
<p>
<a name="21"><b>gBootRoot doesn't start because it can't locate Gtk.pm?</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></P>
<p>This program requires Gtk-Perl available from <a href="http://www.perl.com/CPAN">CPAN</a>, <a href="http://freshmeat.net/projects/gtk-perl">Freshmeat</a> or most GNU/Linux distributions.</p>
<p><a name="22"><b>If you roll the floppy density counter down to 0 and then try go back
up towards 1440 and 1722, you get very funny figures.</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
This is because of the way Gtk works.&nbsp;&nbsp;There are two adjustments,
step and page increments.&nbsp;&nbsp;When you press your first mouse button the step
has been set to 282 so that a person can easily switch between 1440 and 1722.
&nbsp;&nbsp;When you use your second mouse button the page is set at 360. You can go
down to zero by pressing your third mouse button on the
down arrow.&nbsp;&nbsp;Now
page up with the second button to 1440 and step with the first button to
1722.&nbsp;&nbsp;Pretty cool, eh?</p>
<p>While we are on this subject please check out these keyboard shortcuts for Gtk.</p>
<P>Motion Shortcuts
<UL>
<LI> Ctrl-A Beginning of line </LI>
<LI> Ctrl-E End of line </LI>
<LI> Ctrl-N Next Line </LI>
<LI> Ctrl-P Previous Line </LI>
<LI> Ctrl-B Backward one character </LI>
<LI> Ctrl-F Forward one character </LI>
<LI> Alt-B Backward one word </LI>
<LI> Alt-F Forward one word </LI>
</UL>
<P> Editing Shortcuts
<UL>
<LI> Ctrl-H Delete Backward Character (Backspace) </LI>
<LI> Ctrl-D Delete Forward Character (Delete) </LI>
<LI> Ctrl-W Delete Backward Word </LI>
<LI> Alt-D Delete Forward Word </LI>
<LI> Ctrl-K Delete to end of line </LI>
<LI> Ctrl-U Delete line </LI>
</UL>
<P>Selection Shortcuts
<UL>
<LI> Ctrl-X Cut to clipboard </LI>
<LI> Ctrl-C Copy to clipboard </LI>
<LI> Ctrl-V Paste from clipboard </LI>
</UL>
<p><a name="23"><b>Changing from gz to bz2 compression for the boot image in the main section has no effect and gzip is still executed.</b></a>&nbsp;&nbsp;<a href="#FAQ">[back]</a></p>
<p>
In the main section to two check boxes are just indicators of what
compression has been used on the root filesystem.&nbsp;&nbsp;
Gz if gzipped, and bz2
in bzip2ed, and gz if uncompressed.&nbsp;&nbsp;
Usually, the compression is
auto-detected, but if it isn't you can manually choose the compression
type, or override the real compression type.&nbsp;&nbsp;
In the ARS you can actually
compress a root filesystem after it has been created by turning
compression on, choosing a compression type, and pressing the Accept
button.&nbsp;&nbsp;
Basically, the main section just assumes you already have a
compressed filesystem, this will change in the future; however, actual
compression is done either in the ABS (not yet) or the ARS, the main
section is just used to put together the parts.
<a name="cli-help"><h2>CLI Help</h2></a>
<pre>
Usage: gbootroot [OPTION]...
--help -h help
--template=name required option - template in default template dir
$HOME/.gbootroot/yard/templates/[name]
(defaults)
--method=name yard
--root-filename=name root_fs
--filesystem-size=size 8192
--filesystem-command=c "genext2fs -z -r0"
--uml-exclusively=on|off off
--uml-kernel=path $HOME/.gbootroot/uml_kernel/linuxbr
--preserve-ownership=y|n n
--genext2fs-dir=dir /usr/lib/bootroot/
--expect-program=path /usr/lib/bootroot/expect_uml
--root-fs-helper=path /usr/lib/bootroot/root_filesystem/root_fs_helper
--home=dir gui mode = without other options
cl mode = with other options
min: --template
(system kernel options)
--kernel=path specify different system kernel
--kernel-version=version specify alternative version
(print options)
--no-stdout don't print to console
</pre>
<a name="template-help"><h2>Yard Template Help</h2></a>
<h3> Format rules </h3>
<ul>
<li> Lines beginning with # or % are comments.
<p>
<li> Blank lines and whitespace are ignored.
<p>
<li> Lines of the form "filename1 -> filename2" will create symbolic (soft)
links on the root fs. For example, if you want sh linked to ash
in the root fs you could specify: "/bin/sh -> /bin/ash".
The literal output from the last column found when using `ls -s`
may be used, or fictional links may be created, for instance,
ashsa -> bash (In this case if /bin/bash exists on the system the link
would be /bin/ashsa -> /bin/bash, otherwise /asha -> /bash)
(There is no way to specify hardlinks, though hard linked files
that exist on the hard disk will be hard linked.)
<p>
<li> Lines of the form "filename1 <= Replacements/pathto_filename2"
will cause filename2 to be copied to filename1 on the root fs.
This is useful for specifying trimmed-down replacements for
/etc/passwd, /etc/inittab, etc. For the above example, filename2
is found in its real path below the Replacements directory which is
found in the default Replacements path of $HOME/yard/Replacements.
Replacements may be specified in their absolute or relative paths
(found using $PATH).
<p>
<li> User defined paths may be specified in the Path Box
(Edit->Settings->Path). These paths may be used to search for the
relative paths for Replacements, links and files.
<p>
<li> Glob designations (?, * and []) are generally allowed, eg /dev/hd[ab]*
Wildcards are not allowed in link specs or replacement specs.
<p>
<li> The $RELEASE variable which may be used to locate the modules directory
can come from one of three sources, the kernel version returned from a
selected kernel in the main section,
a user defined kernel version in the ABS, or the value of `uname -r`
returned automatically when the other two sources aren't specified.
<p>
<li> You don't need to explicitly specify intermediate directories unless you
just want to make sure they exist.
<p>
<li> You don't need to specify shared libraries or loaders because
necessary libraries are detected automatically.
<p>
<ul> <h3> Control Structures </h3>
<p>
<li> The if/elsif operator may be used to test for the existence of an
absolute or relative file condition. If the condition is true
than the following statements will be parsed, otherwise additional
conditions are examined. The statements can be specified by any
of the formats rules, but can't be on the same line as the
condition. The \ deliminator is used at the beginning and ending
of the control structure so that the parser knows how to properly
treat the logic.
<p>
<li> This is especially useful for creating templates that work
properly for different distributions allowing portability.
Consider these examples:
</ul>
<pre>
Example 1
---------
\
if ( mingetty )
/etc/inittab <= Replacements/etc/inittab.example.mingetty-rpm
/sbin/mingetty
/etc/gettydefs
elsif ( agetty )
/etc/inittab <= Replacements/etc/inittab.example.agetty-slack
/sbin/agetty
/etc/gettydefs
elsif ( getty )
/etc/inittab <= Replacements/etc/inittab.example-deb
/sbin/getty
\
Example 2
---------
\ if ( /etc/pam.d/system-auth )
/etc/pam.d/system-auth \
</pre>
<ul> <h3>NSS and PAM</h3>
<p>
<li> You may choose between two behaviors for the treatment of NSS and PAM
libraries. The old Yard behavior assumes that only the user knows which
service modules they want to include in the file set, and tests
(see Tests menu) may be run on the configuration files to show what isn't
provided, so that the user can include the missing modules manually by
editing the template, but the user still needs to figure out any
dependencies since the modules are dynamically loaded.
<p>
<li> The new Yard behavior (default) assumes that the user does know what they
want based on what the user puts in the NSS (nsswitch.conf) and PAM
(pam.conf or pam.d/*) configuration files. The configuration files are
then parsed and the corresponding service modules are included in the
file set if they exist on the host system, tests (see Tests menu) can be
run to find out which ones don't exist. The service modules are checked
for library dependencies. What this means is that the user only needs
to specify the configuration files in the template, and doesn't need to
be concerned with the service modules or libraries involved. The new
behavior is recommended, and won't effect the file set even if the
requirements are already included in the template. If desired, the old
behavior may be regained by switching off Edit->Settings->"NSS Conf"
and Edit->Settings->"PAM Conf".
</ul>
</ul>
<h2><a name="links">Links</h2>
<ul>
<li><a href="http://gbootroot.sourceforge.net">
gBootRoot</a> and
<a href="http://www.sourceforge.net/projects/gbootroot">
site at SourceForge</a>
22 years ago
<li><a href="http://en.tldp.org/HOWTO/Bootdisk-HOWTO/index.html">
BootDisk-HOWTO</a>
<li><a href="http://user-mode-linux.sourceforge.net">
User Mode Linux</a>
<li><a href="http://www.stearns.org/mkrootfs/rootfs.html">
Bills UML Root filesystems</a>
<li><a href="http://umlbuilder.sourceforge.net">
UML Builder</a>
22 years ago
<li><a href="http://www.busybox.net">
BusyBox</a>
<li><a href="http://trinux.sourceforge.net">
Trinux</a>
<li><a href="http://www.toms.net/rb/">
tomsrtbt</a>
<li><a href="http://usermodelinux.org/">User-Mode Linux Resources</a>
<li><a
22 years ago
href="http://www.stearns.org/slartibartfast/uml-coop.current.html">User-Mode
Linux Co-op</a>
<li><a href="http://uml.openconsultancy.com/">UMLd & Paper with resources</a>
<li><a href="http://usermodelinux.co.uk/">usermodelinux.co.uk</a>
<li><a href=" http://www.tldp.org/HOWTO/SSI-UML-HOWTO/">Creating SSI Clusters Using UML HOWTO</a>
<li><a
href="http://foundries.sourceforge.net/images/articles/clustering/umlopenmosix/umopenmosix.html">User
Mode openMosix</a>
</ul>
<br><br><br>
<a name="contact">
Contact me:&nbsp;&nbsp;Jonathan Rosenbaum&nbsp;&nbsp;<a href="mailto:freesource@users.sourceforge.net">freesource@users.sourceforge.net</a>
<br>
Submit a Bug:&nbsp;&nbsp;<a href="http://sourceforge.net/bugs/?group_id=9513">gBootRoot Bug System</a>
<br>
Join or browse the mailing lists:&nbsp;&nbsp;<a href="http://sourceforge.net/mail/?group_id=9513">gbootroot-{devel,user} mailing lists</a>
23 years ago
<br>
Ask a question:&nbsp;&nbsp;<a href="http://sourceforge.net/forum/forum.php?forum_id=29639">Help Forum</a>
<br>
Start a discussion:&nbsp;&nbsp;<a href="http://sourceforge.net/forum/forum.php?forum_id=29638">Open Discussion Forum</a></a>
23 years ago
<p>
<br><br><br><br><br>
<p align="center">
<IMG ALT="Larry Ewing's Penguin celebrates in gBootRoot." SRC="images/peng-movie.4.gif"></p>
<p>
23 years ago
</body></html>