Sign in with
Sign up | Sign in
Your question

How to install new linux version from second hard drive?

Last response: in Linux/Free BSD
Share
September 6, 2012 1:08:57 PM

Hello,
I have a dell server running at a physically remote location. It has a DRAC for remote bios level console access. It got installed with 32 bit fedora by mistake and I need to reinstall with 64 bit fedora. It has 3 logical drives which are each actually raid1 drive pairs (sda, sdb, sdc) with the current OS installed on sda. sdb and sdc are more or less free. Is there a way that I can either install 64 bit FC17 to sdb (and then switch to booting from sdb), or "burn" a bootable install ISO to sdb and then boot from it to installl back to sda ? My main issue is that there is no CD media in the drive or USB flash stick and I am remote from the system, so I need to figure out how to do the reinstall using only the installed hard drives (and the console access I have via the DRAC)

More about : install linux version hard drive

September 14, 2012 2:05:34 PM

Perhaps a network installation, but I haven't done that.

You could perhaps run the Fedora installer and install a 64bit version by adding the packages, but that could as well break the existing Fedora 32 bit installation as you would be using that for installation.

One way around may be to download a Fedora 64 bit ISO to disk and mount it as a loop device. Then chroot to the mounted loop device (make sure to change the /proc/ etc. file systems to point to the loop device).

Run the installer from within the new chroot environment and install to the disk you have in mind (sdb ?), not your original Fedora 32 bit system. Still in the chroot environment, check and perhaps edit the default grub file to get entries for both the old and new system, and a boot menu to select from. After the adjustments run update-grub (for Ubuntu/Debian based systems, check what you need for Fedora). Check to make sure that your grub file is updated (you might want to install grub on the current boot disk, that is sda, or on your new Fedora 64 sdb drive and make it bootable).

Exit chroot and restore the system file pointers (search for exact procedure if unfamiliar, as this is important both when doing chroot to the loop device and when exiting), use a sync command to make sure everything is written to disk.

You'll need to reboot and hope for the best.

WARNING: I've never done this, let alone on a remote PC with no USB or CD medium to use. So please search for more info before trying it.

Here my reasoning behind this method:

1. You can use a ready 64 bit ISO image, store it on sda, and mount it as loopback device.

2. When you chroot to the ISO image, you will be working from within that image and all commands you enter will use the commands on this image. I've done that when installing Linux Mint 13 on LVM partitions. Linux Mint doesn't have a LVM option on the installation ISO, so I had to download LVM to prepare the installation disk, then chroot into it, install LVM, and update-grub to load the LVM module when rebooting.

I checked the commands to do the chroot. After your mount the ISO loopback image, enter the following as root:

mount --bind /dev /mnt/dev
chroot /mnt # /mnt is where you mounted the ISO image
mount -t sysfs none /sys
mount -t proc none /proc
mount -t devpts none /dev/pts

Install your Fedora 64 bit system on the disk you choose, make sure to update the grub configuration and run update-grub (perhaps a different command in Fedora). Then enter as follows:

umount /dev/pts
umount /proc
umount /sys
exit # to exit chroot

The above commands are for Debian systems, as already mentioned. You can check the directories used above to see if they are the same on Fedora, or find some info pertaining to Fedora.

Hope it helps.


m
0
l
Related resources
!