NetAdminTools.com
 
SignalQ Sites:
NetAdminTools - Coprolite - NoNIC - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - MCJ - FixRambler
Categories:
GNU/Linux | Homebrew designs | Perl | Administration | Backup/Recovery | Bugs/Fixes | Certification | Database | Email | File/Print | Hardware | Information Grab Bag | Interoperability | GNU/Linux ABCs | Monitoring | Name Resolution | Network Services | Networking | Remote Control | Security | Desktop | Web | BSD | Solaris | GIAGD | REALbasic

Last 30 Days | Last 60 Days | Last 90 Days | All Articles | RSS | Hail Support


Categories:
·GNU/Linux
·Homebrew designs
·Perl
·Administration
·Backup/Recovery
·Bugs/Fixes
·Certification
·Database
·Email
·File/Print
·Hardware
·Information Grab Bag
·Interoperability
·GNU/Linux ABCs
·Monitoring
·Name Resolution
·Network Services
·Networking
·Remote Control
·Security
·Desktop
·Web
·BSD
·Solaris
·GIAGD
·REALbasic
·All Categories


Bull-Headed Booting
Topic: Backup/Recovery   Posted:2003-01-09
Printer Friendly: Print

spacerspacer
One handy tool for booting linux systems and mounting the root partition is Loadlin. Now, Loadlin is *really* old, but there have been many times it has saved our sorry arses. You can get loadlin here. Loadlin needs some kind of *DOS on the floppy to boot from. MS-DOS 6.22 works fine; however, if you would like something that is maintained and free, you might try FreeDOS. [DR-DOS? Was it because the DR dudes were relaxing by the pool and didn't want to talk to the IBM suits when they called? That is how Agatha remembers hearing the story. Hats off to Bill for keeping us from all running Display Writer for fifteen years!!] Cough... this is a story about Booting. Anyway, you need some kind of DOS. Snag a floppy boot image of FreeDOS here. Create the diskette:

bash-2.05a# cat BTFDOSB7.IMG > /dev/fd0
bash-2.05a# mount -t vfat /dev/fd0 /mnt
bash-2.05a# ls /mnt
autoexec.bat  config.sys   fdkernel.lsm  kernel.sys    readme
command.com   copying.txt  fdos          kernel16.sys
bash-2.05a#

Copy your kernel, loadlin.exe, and edit a linux.bat:

bash-2.05a# cp loadlin.exe /mnt
bash-2.05a# cp vmlinuz /mnt
bash-2.05a# cat /mnt/linux.bat
loadlin vmlinuz root=/dev/sda3 ro vga=3
bash-2.05a# ls /mnt
autoexec.bat  copying.txt   kernel.sys    loadlin.exe
command.com   fdkernel.lsm  kernel16.sys  readme
config.sys    fdos          linux.bat     vmlinuz
bash-2.05a#

Modify linux.bat for the location of your root partition. This also assumes that your kernel has the correct drivers built in. Loadlin does have options for an initrd file if you need it. There are also some utilities included with FreeDOS:

bash-2.05a# ls /mnt/fdos
Xkeyb.txt    fdiskhlp.txt  ldxkeyb.bat   te.exe
attrib.com   fdiskpt.ini   listxdef.exe  xkeyb.exe
choice.exe   format.exe    more.exe      xkeybres.exe
drvmngr.exe  keyb.bat      scankbd.exe
fdisk.exe    keydefs       sys.com
fdisk.ini    keyman.exe    te.doc
bash-2.05a#

One cool utility is te, an editor quite similar to the Borland C++ 3.1 IDE. Another cool thing is that the FreeDOS fdisk sees Linux partitions correctly. Might be useful in a pinch. To boot your system using the above diskette, just boot and type linux. Create a floppy like this for every system!! For an alternate approach, see our SysLinux article.




Please read our Terms of Use
Microsoft, Windows, Windows XP, Windows 2003, Windows 2000, and NT are either trademarks or registered trademarks of Microsoft Corporation. NetAdminTools.com is not affiliated with Microsoft Corporation. Linux is a registered trademark of Linus Torvalds, and refers to the Linux kernel. The operating system of most distributions that contain the Linux kernel is GNU/Linux. All logos and trademarks in this site are property of their respective owner. Copyright 1997-2008 NetAdminTools.com

Created by:
MCJ
MCJ CMS