|
||||||||
|
||||||||
|
|
Công Cụ | Xếp Bài |
15-08-2014, 10:52 AM | #1 |
Guest
Trả Lời: n/a
|
Hướng dẫn cài đặt CentOS 5 trên ổ cứng 2TB , 3TB...
Hướng dẫn cài đặt CentOS 5 trên ổ cứng 2TB , 3TB... Installing CentOS 5 on a 3 TB Drive The bigger problem: It must be CentOS 5. While this would be a trivial task with a newer OS, CentOS 5 only supports MBR style partitioning, which itself only supports drives less than 2 TB in size; well let us be clear, the installer and GRUB shipped with the installation disk only support MBR normally, the kernel supports the GPT format. GPT is a newer partition format that was introduced by EFI standard, which can support booting from large devices. From various documents and postings on the internet it seemed possible to still use MBR with more than 2TB, but in practice this turned out to be completely unsuccessful. So we moved on with a plan to use GPT. Since the CentOS 5 installer cannot work with GPT partition tables, we needed to use something else to create the partitions we wanted. We did this by using a rescue CD, like SystemRescue CD from here http://www.sysresccd.org/Download.
The first installation step at this stage is to modify anaconda so that it doesn't produce an unskippable error due to there being an "unsupported" GPT. First create a ramdisk to contain a copy of the anaconda libraries: mkdir /mnt/anacondalib mount -t tmpfs none /mnt/anacondalib cp -R /mnt/runtime/usr/lib/anaconda/* /mnt/anacondalib/ Now edit the python file at /mnt/anacondalib/partitions.py, and on line 1082 (vi and nano are present in the rescue image for editing), change the word "errors" to the word "warnings" - this little change allows anaconda to install despite the fact that we've setup the partitions using GPT for the /boot partition, which is what will normally cause the install to fail. Now we mount the changed library directory over the read-only version from the installation media: mount -o bind /mnt/anacondalib/ /mnt/runtime/usr/lib/anaconda/ Now we have to move /sbin out of way otherwise anaconda will fail complaining that /sbin already exists: export PATH=$PATH:/sbin.bak mv /sbin /sbin.bak mkdir /sbin Now we can start anaconda: centos_mirror="http://ftp.fau.de/centos/5.10/os/x86_64/" anaconda --dmraid --selinux -T -m $centos_mirror You may of course replace $centos_mirror with your preferred mirror. You may then walk through the Anaconda installation menus, proceeding until you get to the "Partitioning Type" step at which point the Create custom layout should be selected. This will take you to a Partitioning screen showing the partition scheme created during the GPT partition creation steps above. After setting your large main logical volume to mount as / (root) and your boot partition to mount as /boot, you should visually confirm the layout and proceed. After accepting the warning about using unsupported GPT partitioning, you will be prompted for several screens about grub options, all of which should be correct so may be accepted at their defaults. After this, the installation should be able to proceed as normal. Once the OS installation is complete, you will be prompted to eject any media and reboot the machine. You can go ahead and try (we did), but you should run into an error similar to "No bootable media found." and the system is unable to boot. This is because the version of grub that is installed doesn't know how to deal with GPT partition tables. So the next step is to install a newer version of grub. We found some instructions at the bottom of this page: http://www.sysresccd.org/Sysresccd-P...PT-disk-layout. We didn't follow those exactly, so here is what we did:
mkdir /mnt/boot mount /dev/sda1 /mnt/boot # mount your /boot partition to /mnt/boot cp /lib/grub/x86_64/* /mnt/boot/grub/ umount /mnt/boot grub # no arguments, entered grub shell root (hd0,0) setup (hd0,0) ^D # exit grub shell Now reboot the machine (without the SystemRescue CD) At this point the machine successfully booted for us. Yay! Problem solved. References: http://blog.endpoint.com/2013/11/ins...3tb-drive.html |
|
|