banjo Posted February 24, 2004 Report Share Posted February 24, 2004 I am trying to create a new boot disk which is a copy of my current, smaller disk. I have not cloned the disk because the new disk is larger and I have restructured the partitions to make the new disk a bit more friendly to the way I want to use the system. So I am constructing the new disk manually. Here is the partition info for the new disk: part1 is / part5 is swap part6 is /home part7 is /usr Here is what I did: I installed the new drive as the primary IDE slave along with the primary IDE master in order to do the copies, etc. so the new disk showed up as /dev/hdb. I booted knoppix. I partitioned the new disk (cfdisk), made part1 bootable, made file systems, and copied all of the files. Everything looks to be in good order. I then attempted to install lilo on the new disk. > umount /dev/hda (just to be safe) > mkdir /mnt/newroot (shows up in the knoppix RAM disk /mnt) > mount -w /dev/hdb1 /mnt/newroot > mount -w /dev/hdb6 /mnt/newroot/home > mount -w /dev/hdb7 /mnt/newroot/usr > cd /mnt/newroot > sbin/lilo -v -v -r /mnt/newroot Everything seemed to go well, and I was informed that the Master Boot Record had been written. I then opened the box and attached the new hard drive as the only drive in the system and as primary IDE master, jumpers set appropriately. I checked in CMOS setup and the new disk was recognized properly. When I continued the boot, the computer went through the POST and then froze with a black screen and a blinking cursor in the upper left corner. No boot. No errors. No messages. No nothin'. Nada. Zilch. Black screen of death. So I googled. The explanation for the problem that I have found in the docs is that either no lilo is installed at all in the MBR or the partition is not "active". I must be missing something important in how to use lilo. Here are my questions: What is an "active" partition? Is that different from a "boot" partition? How do I specify the active partition in cfdisk? I don't see a flag or menu for "active" in cfdisk. The lilo.conf on the new disk refers to /dev/hda as the boot disk because that is where the disk will reside when I reboot. Does lilo.conf have to refer to /dev/hdb at install time since that is where the disk sits when I install lilo? Should I install the new disk as primary IDE master and *then* boot knoppix and run lilo? Does it matter? What does mkswap do? If I have already defined partition 5 as a swap partition, is that enough? I don't remember running mkswap. Many thanks to the fine folks on this board for all the help. My hope is to know enough one day to answer these kinds of questions for others. Linux rocks! (if I can just get it to boot....) Banjo (_)=='=~ Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted February 25, 2004 Report Share Posted February 25, 2004 (edited) Try just booting with the first install CD with your new disk set as the only disk on the system and then hit F1, type rescue at the prompt. Choose 'Mount partitions under /mnt' Then 'Go to console'. Then type chroot /mnt and edit fstab to make sure it s correct as far as /dev/hda<whatever>, save it. Then make sure lilo.conf is correct. Then type lilo -M /dev/hda. If this gives you some error about /dev/hda is not existent, then you may have to reboot into Rescue mode between editing fstab and lilo. If you don't know how to edit at the commandline, it is something like this: vi /etc/fstab <<hit i to enter edit mode>> <<make changes>> <<hit Esc, then type :wq and hit Enter>> Edited February 25, 2004 by Steve Scrimpshire Quote Link to comment Share on other sites More sharing options...
banjo Posted February 25, 2004 Author Report Share Posted February 25, 2004 Thanks for the info. I think that my next move will be to try lilo again with the new disk as /dev/hda. I am suspicious that my last attempt, where the new disk was /dev/hdb, somehow wrote the new MBR into the void (or, horrors, onto the other disk). But at the point where I ran lilo, /dev/hda was not mounted at all. So, I don't know where it went. I have already edited /etc/fstab on the new disk, so the mounts should happen if I can get lilo to work. Being an old Unix hack, my fingers know vi. :D I don't even have to think about it. Heck, I have done whole projects using ed, which begat ex, which begat vi, which begat vim, which begat gvim, which..................... well you get my point. BTW, do you know if "active" is the same as "boot"? My part1 is marked as "boot", but I could not find "active" anywhere in cfdisk. Thanks again for the help. Banjo (_)=='=~ Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted February 25, 2004 Report Share Posted February 25, 2004 AFAIK, /dev/hda wouldn't have to be mounted for lilo to get written there. Since fstab is correct as the new disk, then do the rescue up to and including chroot /mnt then run lilo -M /dev/hda with the new disk being the only disk (if lilo is correct, of course). That should do it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.