Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > by-pkgid > 965e33040dd61030a94f0eb89877aee8 > files > 2823

howto-html-en-20080722-2mdv2010.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>RedHat Linux KickStart HOWTO: Mounting the boot/supp disks</TITLE>
 <LINK HREF="KickStart-HOWTO-9.html" REL=next>
 <LINK HREF="KickStart-HOWTO-7.html" REL=previous>
 <LINK HREF="KickStart-HOWTO.html#toc8" REL=contents>
</HEAD>
<BODY>
<A HREF="KickStart-HOWTO-9.html">Next</A>
<A HREF="KickStart-HOWTO-7.html">Previous</A>
<A HREF="KickStart-HOWTO.html#toc8">Contents</A>
<HR>
<H2><A NAME="s8">8. Mounting the boot/supp disks</A></H2>

<P>
<P>The RedHat boot disk <EM>boot.img</EM> is in MS-DOS format, using the
<CODE>SYSLINUX</CODE> program to boot up.  The supplementary disk
<EM>supp.img</EM> is a Linux <CODE>ext2</CODE> filesystem.  If you have
support for the loopback filesystem in your Linux kernel, you can mount
both of these files in your filesystem and hack at them:
<P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
# mkdir -p /mnt/boot /mnt/supp
# mount -o loop -t msdos boot.img /mnt/boot
# mount -o loop supp.img /mnt/supp
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>Now you should be able to see and manipulate the files on the boot and
supplementary disk under <EM>/mnt/boot</EM> and <EM>/mnt/supp</EM>
respectively.  Phew!  Note that older versions of <CODE>mount</CODE> may
not be able to handle the <CODE>-o loop</CODE> option.  In these cases
you'll need to explicitly use <CODE>losetup</CODE> to configure the
loopback device for each file, e.g.
<P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
# losetup /dev/loop0 boot.img
# mount -t msdos /dev/loop0 /mnt/boot
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>You might also need to explicitly use the <CODE>-t ext2</CODE> option when
mounting an <CODE>ext2</CODE> filesystem like the one on the supplementary disk.
But, it looks like people with modern Linux distributions shouldn't have to
worry about this.
<P>
<P>Of course, if you don't want to mess around too much, you can cut a
corner and manipulate actual floppy disks rather than these floppy
disk images.  If time is important, you'll probably prefer to use the
loopback devices, since you can hack around with the disk images
without incurring the latency associated with a genuine floppy disk
read/write.
<P>
<P>
<P>
<HR>
<A HREF="KickStart-HOWTO-9.html">Next</A>
<A HREF="KickStart-HOWTO-7.html">Previous</A>
<A HREF="KickStart-HOWTO.html#toc8">Contents</A>
</BODY>
</HTML>