This file is indexed.

/usr/share/doc/newbiedoc/newbiedoc.berlios.de/wiki/How_to_create_a_Grub_disc_to_boot_a_Debian_GNU/Linux_system.html is in newbiedoc 0.8.0-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
				<meta name="keywords" content="How to create a Grub disc to boot a Debian GNU/Linux system,Manager,GNU Free Documentation License,Index" />
		<title>How to create a Grub disc to boot a Debian GNU/Linux system - NewbieDOC</title>
		
                
	</head>
<body  class="mediawiki ns-4 ltr page-NewbieDOC_How_to_create_a_Grub_disc_to_boot_a_Debian_GNU_Linux_system">
	<div id="globalWrapper">
		<div id="column-content">
	<div id="content">
		<a name="top" id="top"></a>
				<h1 class="firstHeading">How to create a Grub disc to boot a Debian GNU/Linux system</h1>
		<div id="bodyContent">
			<h3 id="siteSub">From NewbieDOC</h3>
			<div id="contentSub"></div>
			<!-- Bad Behavior 2.0.11 run time: 16.642 ms --><dl><dt><a href="http://newbiedoc.berlios.de/wiki/User:Manager" title="User:Manager">Chris Lale</a>
</dt><dd>chrislale AT users DOT berlios DOT de (publisher)
</dd></dl>
<p><b>Go to <a href="../Index.html" title="NewbieDOC:Index">NewbieDOC index</a></b>
</p><p><b>Revision History</b>
</p>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><hr/>
</td></tr>
<tr>
<td rowspan="2" valign="top">Revision 1.0
</td><td valign="top">26th February 2007
</td><td valign="top">Revised by <a href="http://newbiedoc.berlios.de/wiki/User:Manager" title="User:Manager">Chris Lale</a>
</td></tr>
<tr>
<td colspan="2" valign="top">Initial release.
</td></tr>
<tr>
<td colspan="3"> <hr/>
</td></tr>
<tr>
<td rowspan="2" valign="top">Revision 1.1
</td><td valign="top">22nd November 2007
</td><td valign="top">Revised by <a href="http://newbiedoc.berlios.de/wiki/User:Manager" title="User:Manager">Chris Lale</a>
</td></tr>
<tr>
<td colspan="2" valign="top">Modified to include Revision History, Abstract and Appendix for Licence, so that a stable version can be included in the "newbiedoc" package.
</td></tr>
<tr>
<td colspan="3"> <hr/>
<p><br />
</p>
<table style="border-color:silver;border-style:solid;border-width:1px 1px 1px 1px;width:100%;text-align:left;margin-bottom:1em;background:#f9f9f9;padding:.3em">
<tr>
<td> <a href="http://newbiedoc.berlios.de/wiki/Image:Newbiedoc-32.png" class="image.html" title="Image:Newbiedoc-32.png"><img alt="Image:Newbiedoc-32.png" src="../../images/7/76/Newbiedoc-32.png" width="32" height="32" border="0" /></a>
</td><td> <b></b>
</td><td> <b>Stable document</b>
</td></tr>
<tr>
<td>
</td><td>
</td><td style="width:100%">You can comment on this document by clicking on the <a href="http://newbiedoc.berlios.de/wiki?title=NewbieDOC_talk:How_to_create_a_Grub_disc_to_boot_a_Debian_GNU/Linux_system&amp;action=edit" class="external text.html" title="http://newbiedoc.berlios.de/wiki?title=NewbieDOC_talk:How_to_create_a_Grub_disc_to_boot_a_Debian_GNU/Linux_system&amp;action=edit" rel="nofollow"><b>discussion</b></a> tab.
<p>You can edit the live version of this document: <a href="http://newbiedoc.berlios.de/wiki/How_to_create_a_Grub_disc_to_boot_a_Debian_GNU/Linux_system" class="external text.html" title="http://newbiedoc.berlios.de/wiki/How_to_create_a_Grub_disc_to_boot_a_Debian_GNU/Linux_system" rel="nofollow">How to create a Grub disc to boot a Debian GNU/Linux system</a>
</p>
</td></tr></table>
<p><br />
<b>Abstract</b>
</p><p>It helps to be prepared. This NewbieDOC article helps you to plan for disaster by making a boot floppy or CD to boot your Debian system in case another operating system overwrites your MBR. 
</p><p><br />
</p>
<table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="Linux_system.html#The_advantage_of_having_a_Grub_boot_disc"><span class="tocnumber">1</span> <span class="toctext">The advantage of having a Grub boot disc</span></a></li>
<li class="toclevel-1"><a href="Linux_system.html#Create_a_boot_floppy"><span class="tocnumber">2</span> <span class="toctext">Create a boot floppy</span></a></li>
<li class="toclevel-1"><a href="Linux_system.html#Create_a_boot_CD"><span class="tocnumber">3</span> <span class="toctext">Create a boot CD</span></a></li>
<li class="toclevel-1"><a href="Linux_system.html#How_to_use_the_Grub_boot_disc_to_repair_the_MBR"><span class="tocnumber">4</span> <span class="toctext">How to use the Grub boot disc to repair the MBR</span></a></li>
<li class="toclevel-1"><a href="Linux_system.html#Appendix_A:_Licence"><span class="tocnumber">5</span> <span class="toctext">Appendix A: Licence</span></a></li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
<p><br />
</p>
<a name="The_advantage_of_having_a_Grub_boot_disc"></a><h2> <span class="mw-headline">1  The advantage of having a Grub boot disc </span></h2>
<p>If you have more than one operating system on a dual- or multi-boot Debian system, you run a small risk of damaging the Grub bootloader. This might happen if another operating system overwrites the boot sector. It might also happen if you have several versions of Debian on different partitions and you remove one of them. The answer is to create a Grub boot disc (floppy or CD) that will boot into Debian on a partition that you know will never be moved or removed.
</p>
<a name="Create_a_boot_floppy"></a><h2> <span class="mw-headline">2  Create a boot floppy </span></h2>
<p>The way to create a Grub boot floppy for Debian, based on the article at <a href="http://www.linuxjournal.com/comment/reply/4622" class="external free.html" title="http://www.linuxjournal.com/comment/reply/4622" rel="nofollow">http://www.linuxjournal.com/comment/reply/4622</a>, is as follows.
</p><p>Boot into your Debian system. If you have more than one, boot into the system that you know will remain permanently on your hard drive. Insert a floppy disc in your floppy drive and format it. Add a file system. This could be anything that Debian will recognise (eg ext2), but these commands will add an MSDOS filesystem.
</p>
<pre>fdformat /dev/fd0
mkfs -t msdos /dev/fd0
</pre>
<p>Mount the floppy and copy the /boot/grub directory and its contents from the running system to the floppy. 
Unmount the floppy.
</p>
<pre>$ mount -t msdos /dev/fd0 /media/floppy
$ mkdir -p /media/floppy/boot/grub
$ cp /boot/grub/* /media/floppy/boot/grub
$ umount /media/floppy
</pre>
<p>Install the GRUB boot loader in the MBR of the floppy itself. Run grub and enter these commands at the grub prompt.
</p>
<pre>$ grub
grub&gt; root (fd0)
grub&gt; setup (fd0)
grub&gt; quit
</pre>
<p>That's it! To test the floppy, restart the system with the floppy in the drive. You can select which operating system to boot from the usual blue menu.
</p>
<a name="Create_a_boot_CD"></a><h2> <span class="mw-headline">3  Create a boot CD </span></h2>
<p>You can find basic instructions for creating a bootable Grub disc in the manual at <a href="http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD_002dROM.html#Making-a-GRUB-bootable-CD_002dROM" class="external free.html" title="http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD_002dROM.html#Making-a-GRUB-bootable-CD_002dROM" rel="nofollow">http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD_002dROM.html.html#Making-a-GRUB-bootable-CD_002dROM</a>. By adding a slightly modified menu.lst you can create a CD which will boot your system from the usual blue menu.
</p><p>In your "home" directory create a directory (eg "iso") in which to place the files for the CD.
</p>
<pre>$ cd ~
$ mkdir iso
</pre>
<p>Make a directory for Grub and copy the file "stage2_eltorito" to it from /usr/lib/grub/i386-pc/.
</p>
<pre>$ mkdir -p iso/boot/grub
$ cp /usr/lib/grub/i386-pc/stage2_eltorito iso /boot/grub
</pre>
<p>Also copy the menu.lst file to it from /boot/grub.
</p>
<pre>cp /boot/grub/menu.lst iso/boot/grub 
</pre>
<p>Now edit iso/boot/grub/menu.lst and remove any lines identical to "savedefault". Leaving these commands will cause an error because the CD is a read-only disc. A typical menu entry will look like this once "savedefault" has been removed:
</p>
<pre>title		Debian GNU/Linux, kernel 2.6.18-3-686
root		(hd0,5)
kernel		/boot/vmlinuz-2.6.18-3-686 root=/dev/hda6 ro 
initrd		/boot/initrd.img-2.6.18-3-686
</pre>
<p>Finally, make a ISO9660 image file called "grub.iso".
</p>
<pre>$ mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \
   -boot-load-size 4 -boot-info-table -o grub.iso iso
</pre>
<p>Burn the image file onto CD or a DVD. If you are using K3B or GnomeBaker, choose "Burn CDROM Image" from the "Tools" menu. If you are using the command line, you can use cdrecord. There is an explanation of how to do this at <a href="http://www.debian-administration.org/articles/273" class="external free.html" title="http://www.debian-administration.org/articles/273" rel="nofollow">http://www.debian-administration.org/articles/273</a>.
</p>
<div style='border-color:silver;border-style:solid;border-width:1px 1px 1px 1px;width:100%;text-align:left;margin-bottom:1em;background:#f9f9f9;'><div style='clear:both;height:.5em'>&nbsp;</div><div style='float:left;border:0;text-align:left;padding-left:.5em'><a href='http://newbiedoc.berlios.de/wiki/Image:Attach.png' class='image' title=''><img alt='Note' src='../../images/c/c1/Attach.png' border='0'/></a></div><div style='float:left;border:0;text-align:left;padding-left:.5em'> <b>Note:&nbsp;</b> </div><div style='padding-left:11em;padding-right:1em;border:0;text-align:left;'> mkisofs has already set up the disc to boot from the boot/grub/stage2_eltorito file, so there is no need to setup GRUB on the disc. The -boot-load-size 4 bit is required for compatibility with the BIOS on many older machines.</div><div style='clear:both;height:.5em'>&nbsp;</div>
     </div> 
<p>That's it! To test the CD, restart the system with the CD in the drive. You can select which operating system to boot from the usual blue menu.
</p>
<a name="How_to_use_the_Grub_boot_disc_to_repair_the_MBR"></a><h2> <span class="mw-headline">4  How to use the Grub boot disc to repair the MBR </span></h2>
<p>--<a href="http://newbiedoc.berlios.de/wiki/User:Manager" title="User:Manager">Chris Lale</a> 15:32, 2 March 2007 (CET)
</p><p>Your system may stop booting from the hard drive if you install Windows or install another instance of Debian and then remove it.
</p><p>Just boot from your Grub floppy or CD, login, switch user to user root and re-install the Grub bootloader. 
If your first master hard disc is IDE, enter
</p>
<pre># grub-install /dev/hda
</pre>
<p>If your first master hard disc is SCSI or SATA, use
</p>
<pre># grub-install /dev/sda
</pre>
<a name="Appendix_A:_Licence"></a><h2> <span class="mw-headline">5  Appendix A: Licence </span></h2>
<p>Copyright (c) 2007 Chris Lale. chrislale AT users DOT berlios DOT de
</p>
<table style="background-color: transparent" cellspacing="0" cellpadding="0">

<tr>
<td>
<table style="margin: 0.5em auto; width: 80%; background-color: #f8f8f8; border: 2px solid #e0e0e0; padding: 5px">

<tr>
<td> <a href="http://newbiedoc.berlios.de/wiki/Image:Reiss-head-sm.jpg" class="image.html" title="GNU FDL"><img alt="GNU FDL" src="../../images/thumb/7/7c/Reiss-head-sm.jpg/64px-Reiss-head-sm.jpg" width="64" height="62" border="0" /></a>
</td><td> <i>Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "<a href="http://newbiedoc.berlios.de/wiki/GNU_Free_Documentation_License.html" title="NewbieDOC:GNU Free Documentation License">GNU Free Documentation License</a>."</i>
</td></tr></table>
</td></tr></table>
<p><b>Go to <a href="../Index.html" title="NewbieDOC:Index">NewbieDOC index</a></b>
</p>
</td>
</tr>
</table>

<!-- Tidy found serious XHTML errors -->
<!-- 
Pre-expand include size: 1885 bytes
Post-expand include size: 1932 bytes
Template argument size: 470 bytes
Maximum: 2097152 bytes
-->

<div class="printfooter">
<hr/>
Retrieved from "<a href="http://newbiedoc.berlios.de/wiki/How_to_create_a_Grub_disc_to_boot_a_Debian_GNU/Linux_system">http://newbiedoc.berlios.de/wiki/NewbieDOC:How_to_create_a_Grub_disc_to_boot_a_Debian_GNU/Linux_system</a>"</div>
Content is available under <a href="http://www.gnu.org/copyleft/fdl.html" class="external " title="http://www.gnu.org/copyleft/fdl.html" rel="nofollow">GNU Free Documentation License 1.2</a>, unless otherwise stated.</div></div></div></div></body></html>