(原創)有關upgrade Linux OS 時boot機有問題的處理方法
- 詳細內容
- 分類: Linux
- 發佈: 2006-06-23, 週五 10:56
- 作者 Super User
- 點擊數: 18066
一.將old version的harddisk 接到new version 的linux OS後出現read only的解決方法:
1.將old version的harddisk 除下.只用new version 的harddisk 正常boot 機.
2.修改 /etc/grub.conf 和 /etc/fstab 如下:
vi /etc/grub.conf
change
root=LABEL=/
to:
root=/dev/hda3
注意:hda3根據實際而修改.
vi /etc/fstab
將/ /boot swap所對應的行改為如下:
/dev/hda1 / ext3 defaults 1 1
/dev/hda3 /boot ext3 defaults 1 2
/dev/hda2 swap swap defaults 0 0
注意:hda1,hda2,hda3根據實際而修改.
3.加入old version的harddisk 重新boot 機.
二.將原來行raid 1的harddisk(old harddisk).接到重新安裝正常行raid 1的新的server後出現不能正常boot 機的解決方法:
1.在old server上將其中一個harddisk除下.只用一個harddisk 正常boot 機後.做如下setting:
fdisk /dev/hda
The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 83
Changed system type of partition 1 to 83 (Linux)
Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 82
Changed system type of partition 2 to 82 (Linux swap)
Command (m for help): t
Partition number (1-4): 3
Hex code (type L to list codes): 83
Changed system type of partition 3 to 83 (Linux)
Command (m for help): p
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 274 2096482+ 82 Linux swap
/dev/hda3 275 19457 154087447+ 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
2.將old harddisk接到new server後boot 機.