This is a discussion on dual boot hell within the Linux Operating System forums, part of the Unix Operating Systems category; --> I have a dying laptop (a thinkpad a30p) that multi-boots in xp and linux (CentOS 4.2 to be precise). ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have a dying laptop (a thinkpad a30p) that multi-boots in xp and linux (CentOS 4.2 to be precise). I am trying to set up a new laptop (a thinkpad t42p) to take over its job, by coping over most of the partitions. No problems getting the copy of xp copied over. There is a trick to it, but it works just fine (and looks just like the original thinkpad t23 that work gave me, which is sitting in a drawer somewhere with no disk in it, because it no longer works--and I don't want them to replace it because they'll give me an XGA laptop not a UXGA one, plus that wouldn't solve my Linux problem, since they only use xp on laptops). However, getting CentOS, which uses grub as its boot loader, copied over and running is proving problematic. In particular, I have the /boot partition containing grub as the first logical partition in the extended partition area and I put its (stage1?) image in the boot area of that partition (details follow) and boot that from system commander (just as I did on the old laptop). However, grub just types out GRUB and then sits forever, never showing the screen where I can choose the specific Linux kernel from. Ok, here is the layout of the drive (as reported by both gparted and partition magic): (My apologies if the columns don't layout for you.) Linux name DOS name fs size comments /dev/hda1 W98 fat32 132.86MB Win 98 acting as DOS /dev/hda2 XP ntfs 8.36GB preloaded XP /dev/hda3 XP (work) ntfs 18.5GB XP from work /dev/hda4 extended /dev/hda6 /boot ext2 110.68MB grub /dev/hda7 / ext2 502MB CentOS Linux empty space where other Linux partitions will go (/usr /home etc.) /dev/hda5 SERVICE fat32 3.8GB recovery partition Here is my grub.conf: # grub.conf generated by ananconda boot=/dev/hda6 default=1 timeout=10 splashimage=(hd0,6)/grub/splash.xpm.gz title CentOS (2.6.9-11.EL) single root (hd0,6) kernel /vmlinuz-2.6.9.11.EL ro root=LABEL=/ hdb=ide-scsi single initrd /initrd-2.6.9-11.EL.img title CentOS (2.6.9-11.EL) root (hd0,6) kernel /vmlinuz-2.6.9.11.EL ro root=LABEL=/ hdb=ide-scsi initrd /initrd-2.6.9-11.EL.img After moving the partitions, I "installed" grub into its partition by booting a Knoppix CD, running a root shell, mounting /mnt/hda6, running grub, and typing: find /boot/grub/stage2 it reported (hd0,6) root (hd0,6) setup (hd0,6) Suggestions, as to things I should try are appreciated. I got the previous laptop to work, so I suspect with perserverence and the right incantation, I will get this one to work just the same, since the hardware is mostly the same, just the new one uses a Pentium M, rather than a P III, and has a thinner case. Thanks! |
| |||
| Chris F Clark wrote: > [snip] > > After moving the partitions, I "installed" grub into its partition by > booting a Knoppix CD, running a root shell, mounting /mnt/hda6, > running grub, and typing: > > find /boot/grub/stage2 > it reported (hd0,6) > root (hd0,6) > setup (hd0,6) > > Suggestions, as to things I should try are appreciated. I got the > previous laptop to work, so I suspect with perserverence and the right > incantation, I will get this one to work just the same, since the > hardware is mostly the same, just the new one uses a Pentium M, rather > than a P III, and has a thinner case. You should have only typed "find /grub/stage2" because you have a boot partition. There's no /boot directory on the boot partition, but that doesn't matter. (hd0,6) is still the boot partition. Boot into RH rescue mode from the RH installation disk ("linux rescue" at the prompt), let it find and mount the installed RH partitions, then chroot to /mnt/sysimage (which is / on the hard drive). Run grub from there to install. Then exit twice to reboot (although sometimes I have to salute to reboot - YMMV). You really, really need to chroot into the hard drive / and have the RH /dev mounted, too. Really. Knoppix is wonderful, but it isn't going to do all that that for you. |
| |||
| Chris F Clark wrote: > I have a dying laptop (a thinkpad a30p) that multi-boots in xp and > linux (CentOS 4.2 to be precise). I am trying to set up a new laptop > (a thinkpad t42p) to take over its job, by coping over most of the > partitions. No problems getting the copy of xp copied over. There is > a trick to it, but it works just fine (and looks just like the > original thinkpad t23 that work gave me, which is sitting in a drawer > somewhere with no disk in it, because it no longer works--and I don't > want them to replace it because they'll give me an XGA laptop not a > UXGA one, plus that wouldn't solve my Linux problem, since they only > use xp on laptops). What is the trick? I'm planning to copy Windows XP from a bad disk to a good disk, and was thinking of using dd. Is there a better way? > However, getting CentOS, which uses grub as its boot loader, copied > over and running is proving problematic. In particular, I have the > /boot partition containing grub as the first logical partition in the > extended partition area and I put its (stage1?) image in the boot area > of that partition (details follow) and boot that from system commander > (just as I did on the old laptop). However, grub just types out GRUB > and then sits forever, never showing the screen where I can choose the > specific Linux kernel from. Can you just copy the grub files in this way? I would have thought one had to run grub-install? Is your new disk identical to the old? Also, you seemed to be installing the loader on /dev/hda6 . Did you make this partition active? I must say, I was under the impression that /boot was supposed to be on a primary partition, but apparently you have had it working fine on /dev/hda6 . -- Timothy Murphy e-mail (<80k only): tim /at/ birdsnest.maths.tcd.ie tel: +353-86-2336090, +353-1-2842366 s-mail: School of Mathematics, Trinity College, Dublin 2, Ireland |
| |||
| dd probably would work. What doesn't work is to use partition magic installed on xp. PM thinks it is smarter than you and fiddles with the boot.ini so that the system uses the nt loader from the xp partition with pm on it as the c: drive. However, if you run PM from win98 (or lower), it doesn't do that. (That's why I have a win98 partition.) Moreover, dd shouldn't do that either--it's a raw copy. The other trick that you need to do is to make a boot.ini with lots of boot options, so that if the partition number isn't the one you think it is, you can keep guessing until you find it. Suppose it was: [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINNT="xp" make it: [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINNT="xp 1" multi(0)disk(0)rdisk(0)partition(2)\WINNT="xp 2" multi(0)disk(0)rdisk(0)partition(3)\WINNT="xp 3" multi(0)disk(0)rdisk(0)partition(4)\WINNT="xp 4" multi(0)disk(0)rdisk(1)partition(1)\WINNT="xp 1:1" multi(0)disk(0)rdisk(1)partition(2)\WINNT="xp 1:2" multi(0)disk(0)rdisk(1)partition(3)\WINNT="xp 1:3" multi(0)disk(0)rdisk(1)partition(4)\WINNT="xp 1:4" That way if it ends up as partition 2 on the 2nd disk, you can still boot into it from the menu. If you have two controllers, you may want to go even farther with the options. > Can you just copy the grub files in this way? > I would have thought one had to run grub-install? I did grub-install the hard-way, by running root/setup from within grub. However, as the other respondent mentioned maybe I didn't get it written out quite right (well, that appears obvious). (Thanks to Allen for the suggestions. I emailed him, but he is using a fake/spam-blocking account.) > Is your new disk identical to the old? The new and old disks are both 60GB drives, but perhaps the geometry is slightly different, which is why I normally copy with PM. (I couldn't use that here, but that's a diatribe I don't need to go into.) I used gparted, which says it uses dd. > Also, you seemed to be installing the loader on /dev/hda6 . > Did you make this partition active? I believe so, it's one of the things system commander is supposed to do when you tell it which partition has the boot loader. I will check those settings out. Thanks, for giving me many things to check. I know I've klutzed something, and the question is what..... |
| |||
| Chris F Clark wrote: > > [snip] > > I did grub-install the hard-way, by running root/setup from within > grub. However, as the other respondent mentioned maybe I didn't get it > written out quite right (well, that appears obvious). (Thanks to > Allen for the suggestions. I emailed him, but he is using a > fake/spam-blocking account.) > > [snip] > You're welcome. BTW: Obfuscated to keep spam away, but not fake. |
| |||
| Thanks to Allen Kistler, I was able to figure out what I had klutzed and repair it. It runs out that RH had slightly different partition numbers than knoppix, and when I used the copy of grub in the rh sbin partition, it said that stage2 was in (hd0,5) using that for the install partition (and fixing the grub.conf file) made a big difference. It gets much farther now, but there are little things to fix like the ethernet addresses etc (and a dozen things I would overlook and would be broken without me knowing it, rendering the system potentially insecure), so at this point it is obvious that a fresh install for a fresh laptop makes sense. At least I learned something in the process.... |
| |||
| Chris F Clark wrote: > I have a dying laptop (a thinkpad a30p) that multi-boots in xp and > linux (CentOS 4.2 to be precise). I am trying to set up a new laptop Let me delete all this and ask just what you are saying you are doing. From what I read it appears you are trying to transfer a disk image. That cannot work. I am really lost as to what you are saying you did and I cannot see any reason for all the detail if you were not making the mistake I think you are making. In any event the solution is to do an original install and then copy as you have done. The distribution folks know how to make it work and I will not pretend to do their job. In any event I would be surprised if you could not use any flakey install you find and copy your files and find it works. They share methods. They should all be the same by now. -- Have you ever seen a pro-peace, anti-Israel Jew on TV? Why not? What does that say about Jews? -- The Iron Webmaster, 3689 nizkor http://www.giwersworld.org/nizkook/nizkook.phtml environmentalism http://www.giwersworld.org/environment/aehb.phtml a9 |
| |||
| Matt Giwer <jull43@tampabay.REMover.rr.com> writes: > From what I read it appears you are trying to transfer a disk > image. That cannot work. Well, that was my mistaken assumption. There was a time (not that long ago) I could move OS disk images around and have them work. (The image I was trying to move this time, had been previously moved, but that was before I had networking enabled and had to worry about having a security hole.) I think with a little more effort I could get this move to work also. If I could afford more time on it and wasn't worried about security, I would be half-tempted to do so. <rant> However, the world (unfortunately including Linux too) seems to be be moving toward the disposable economy. "When it doesn't work, get a new one." Personally, I would have rather have fixed the breaking laptop, but laptops have not only no user servicable parts, now they essentially have no technician servicable parts. Now, I learn that my lovingly customized and working installation cannot be moved, it must be rebuilt from scratch. That's just making the process more painful, especially since I don't necessarily remember everywhere I tweaked something to behave the way I want it to. It's not like I kept diffs against the vanilla CentOS installation. Even if I had, somethings will undoubtably change if I pick a newer release, and some of the customizations will need to be applied to different spots. I'll still do what diffs I can and move over which customizations that are easy. What I'll end up with is something that isn't quite as good as what I had before in some ways (and hopefully eventually better in others). To me its a shame and I am consciously working to try to keep the software I write from being part of that problem, but aside from that and kvetching there isn't much more I can see to do. </rant> |
| |||
| Chris F Clark wrote: > Matt Giwer <jull43@tampabay.REMover.rr.com> writes: >> From what I read it appears you are trying to transfer a disk >>image. That cannot work. > Well, that was my mistaken assumption. There was a time (not that > long ago) I could move OS disk images around and have them work. (The > image I was trying to move this time, had been previously moved, but > that was before I had networking enabled and had to worry about having > a security hole.) I think with a little more effort I could get this > move to work also. If I could afford more time on it and wasn't > worried about security, I would be half-tempted to do so. Linux to linux maybe but if it already windows installed it has the wrong kind of file system for openers. I guess you could set the user space to a windows file system but the I don't see how the kernal could be convinced to function on one. > <rant> > However, the world (unfortunately including Linux too) seems to be be > moving toward the disposable economy. "When it doesn't work, get a > new one." Personally, I would have rather have fixed the breaking > laptop, but laptops have not only no user servicable parts, now they > essentially have no technician servicable parts. Yes but ... If a laptop dies early you have a point. But after three years and at technician labor for something like a laptop the cost is going to be a fair percentage of a new one. And a new one should be at least twice as good in all areas. On top of that there are so many different makes and models and the parts have different form factors to pack it all in. No shop could afford to stock the parts because they would have to pass on those costs to the customer and that would put the cost of repair even higher. So while some people may be willing to pay the price there won't be enough to keep a shop in business save maybe one in large cities. If there is sentimental value or something to it contact the distributor and ask after repairs. They do repair (sold as refurbished) machines that fail under warranty. -- Hodie postridie Nonas Septembres MMVI est -- The Ferric Webceasar nizkor http://www.giwersworld.org/nizkook/nizkook.phtml Iraqi democracy http://www.giwersworld.org/911/armless.phtml a3 |
| ||||
| Chris F Clark wrote: > Matt Giwer <jull43@tampabay.REMover.rr.com> writes: >> From what I read it appears you are trying to transfer a disk >>image. That cannot work. > > Well, that was my mistaken assumption. There was a time (not that > long ago) I could move OS disk images around and have them work. Matt Giver repsonded to me with: > Linux to linux maybe but if it already windows installed it > has the wrong kind of file system for openers. I guess you could set > the user space to a windows file system but the I don't see how the > kernal could be convinced to function on one. I was not trying to move the linux onto windows (fat|ntfs) partitions, but simply to copy ext2 (linux) partitions from one machine to another and then boot them. The machine I was moving from also was a dual boot machine and had (I thought) the same geometry and partition structure, and also the same devices (e.g. same video card and screen, same ethernet and wireless). It should have been a no-brainer. It's all mostly a moot point, because I've already decided to bite the bullet and install a new copy of CentOS. |