| PLEX86 | ||
|
Moving harddisk with Linux installation to a different machine. 7370
LINUX Server Reboot Frequency 7372 OK: you can't "check for memory leaks" in such closed source code, you can only check that the amount of RAM being used is expanding: the "top" command will give a... what do these names stand for 7376 BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Jesse F. Hughes Nope.usr is "user" As in... "...usr is a directory that contains the directoris... People are doing it all the time and generally it works perfectly. There is at least one way it can fail, though: The new hardware may not (yet) be suppoted by the kernel on the hard disk. In most cases you will still be able to boot the computer, but perhaps not be able to start X, so you would be stuck with console mode until a sufficiently capable kernel is installed. If you know what kernel modules and versions you need, you may be able to download and install a new kernel before moving the disk over. Moving harddisk with Linux installation to a different machine. 7371 I've done it. You will want to think carefully about how your parbreastions are set up, and about where you put your grub, and about where the second... You are using a 2.4 kernel, and I just don't know how much support for newer hw has been backported to 2.4 kernels. Be aware that you can have multiple kernels installed. You could have a recent 2.6 kernel on the disk before the move. But do google to find out if the hw you want to buy is supported yet. (Hey, everyone, is there any problem with Redhat glibc-tls-nptl and 2.6 kernels? I believe the 2.6 kernel runs older libc stuff just fine.) What is too big? The kernel? Yes, that is true. But if the new computer has a floppy drive you can prepare a grub floppy, and then you are almost sure to manage to setup the mbr properly afer the move. (A grub floppy does not contain the kernel, etc, it just contains grub's stage1 and stage2 files. Booting from it you get a command prompt that enables you to query the disks, search for files across parbreastions, set up the MBR or a parbreastion boot record, invoke a config file with boot stanzas, edit the stanzas before using them (but not save the changes to the file), and-or boot specifying your own boot commands.) However, floppies are not in vogue anymore. They tend to be left out from newer computers. It is also possible to setup a Grub CD, but I have never done that. Notice, as will be evident from the points below, that running a Grub CD is not the same thing as running Grub under a Linux Rescue CD or a Knoppix Live CD. You are right. Grub has a problem determining the right order that the Bios will enumerate the disks. With a grub floppy, it's easy, you can use grub to query the disks, and see what number the disks have. Just use the "find" command while running Grub natively (i.e.not under a Linux kernel). If there is only one disk, it is easy too, the disk will be number zero. Say (hd0) to grub. The problem arises when you run grub under Linux to setup the mbr. Then grub has no way of talking to the bios, it has to access the disks through the Linux kernel. If you specify a particular disk to boot from in the Bios setup, the Bios takes that disk out of the regular order and places it first, so Grub will see it as (hd0). There is no way Grub can find out that while running Linux. Otherwise, the standard IDE disks always get enumerated hda, hdb, hdc, hdd, but missing disks are skipped, so if hdb is not present, hdc will get the number after hda. Other disks could come before or after, depending on details in the Bios of the computer and the Bios extensions in installed (or on-board) controllers. Again something hard for Grub to know. If you know the disk is going to be (hd0) on the new computer, while it isdev-hdc under linux on the old computer, I believe you can create a "device.map" file inboot-grub, where you specify "(hd0)dev-hdc", and then run "grub-installdev-hdc", still under linux, to have the mbr of the disk set up for the coming configuration. This will not affect the mbr ofdev-hda, so you should still be able to boot OK on the old computer. It's like having two pointers to the same area, and thedev-hda mbr is used when booting the old computer. The next step is to editboot-grub-menu.lst or *-grub.conf (depending on which distro you have). This file is shared by the two boot paths, and will be correct for only one of them at the time. But if it is incorrect, you still get Grub itself loaded during boot, and can give Grub commands to bypbutt the incorrect config file. (You can even have two config files, and 1) specify a non-standard config filename to grub-install, and 2) you can also say, eg., "configfile (hd0)-grub-newgrub.conf" at the grub prompt after it fails to boot using an incorrect config file.) Yet another idea is to have a double set of boot stanzas in the grub config file. The only thing that fails then, should be the splash image file. You can't have two paths for it. Expect an uglier boot menu. Consider using the "fallback" statement in the config file. (I have never used it.) Caveat: Few people spend their days rearranging boot disks all the day, and neither do I. Everything here is kind-of fragile, subject to misunderstandings or incorrect memories on my part. I have done some experimenting with Grub, read some of the code, received helpfull corrections when I have said something wrong here in the ng, etc, but still the chances of making mistakes are good. I don't have access to all the possible hw combinations either. The Grub documentation is notoriously unclear, although it is improving, and it tries to be verbose. I would like to hear about your experiences, because I am considering writing something about it, if I can collect enough experiences and testimonials (bad ones too, but explained and understood ones better). LINUX Server Reboot Frequency 7373 This used to be true, but no longer. Large chunks are given back to the system. This program: main() { char *p = malloc(1024*1024... -Enrique
|
||||
Moving harddisk with Linux installation to a different machine. 7371 Linux groups from Newsgroups The #1 Usenet Provider on the Internet
|
||||