Chinaunix首页 | 论坛 | 博客
  • 博客访问: 472966
  • 博文数量: 58
  • 博客积分: 6047
  • 博客等级: 准将
  • 技术积分: 838
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-06 21:05
文章分类

全部博文(58)

文章存档

2009年(24)

2008年(34)

我的朋友

分类:

2009-01-03 11:31:12


A while after I published my blog entries on Multibooting Solaris and Windows XP and on Multibooting Solaris, Ubuntu, and Windows XP, I thought it was time for some instructions on multibooting OpenSolaris 2008.11, Kubuntu 8.10, and Windows XP.

On my laptop, a Fujitsu-Siemens S6120D (Pentium M 1.4 GHz, 512 MB RAM, 40 GB IDE disk), I wanted to replace my old Solaris Nevada installation by the new OpenSolaris 2008.11, and then also an old Ubuntu 6.10 by Kubuntu 8.10.

After the OpenSolaris installation, I could boot into OpenSolaris and Windows XP just fine. But when I installed Kubuntu (using ext3 as the / filesystem), with the default install options, the grub that had been installed by OpenSolaris had been overwritten by Kubutu's grub. Even after adding old OpenSolaris entries to the new grub, booting into OpenSolaris failed. After installing OpenSolaris again, that problem was solved, but I could not boot into Kubuntu! The following message was shown on screen:

  Booting 'Ubuntu 8.10, kernel 2.6.27-7-generic'

root (hd0,6)
Filesystem type is ext2fs, partition type 0x83
kernel /boot/vmlinuz-2.6.27-7-generic root=UUID=69585a5b-ba20-43da-984c-148c40f82a7e ro quiet splash

Error 2: Bad file or directory type

Press any key to continue...

Apparently, neither of the two grub installations could read the root filesystem of its "opposite" operating system. The solution for this problem in my case was to chainload the Linux grub from the Solaris grub. I used the following procedure after installing OpenSolaris:

  1. Live boot from the Kubuntu CD and install, or use the "install to disk" menu item (2nd menu item in Kubuntu's entry screen).
  2. Configure all necessary settings, as in the following screen shots:

    Start by choosing the installer's language:



    Select a city close to your desired time zone:



    Select a keyboard layout:



    In the Prepare disk space screen, a proposal like the following might be shown:



    Select the manual partitioning feature to overwrite the old Linux partition:



    The Prepare partitions screen is shown, for example:



    Customize that screen according to your needs, like the following:



    Enter data into all required fields of the Who are you? screen:



    The Ready to install screen is shown. Please DO NOT CLICK on the Install button at this point in time. Instead, click on Advanced:


    This will show up the following screen:


    Change the default Device for boot loader installation to the device name of the Linux partition as shown in the partitioning screen (in my case /dev/sda7). This is to install the boot manager not in the master boot record but in the partition in which Kubuntu is installed.
    Press OK to continue, and then Install in the screen that was shown before (Step 6 of 6). This will install Kubuntu.
  3. After the installation has finished, reboot into OpenSolaris and change file
    /rpool/boot/grub/menu.lst (yes, that's the location of menu.lst in OpenSolaris 2008.11) as follows:
    Add the following lines to boot from the OpenSolaris grub into the Ubuntu grub:
    menu Kubuntu 8.10
    root (hd0,6)
    chainloader +1
    Note that (hd0,6) corresponds to partition number 7 of the first disk (=device /dev/sda7 in my case).
  4. Reboot. You should now be able to boot into Kubuntu's grub and from there into the various menu items configured during the Kubuntu installation (Kubuntu, Kubuntu failsafe/single user, memtest, and even Windows XP).
If it doesn't work (e.g. if you installed the Kubuntu grub boot manager to the master boot record), you do not have to install Solaris again. Just do the following to overwrite the Kubuntu grub by the Solaris grub:
  1. Boot from the OpenSolaris 2008.11 CD.
  2. After booting has finished, open a terminal window and log in as root (password is "opensolaris").
  3. Run the following command:
    $ format
    Notice the device name (e.g. c3t0d0). Install the Solaris grub into the master boot record, using the "-m" option of the installgrub command. For the last argument, add s0 to the device name: /usr/sbin/installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c3t0d0s0
    This will install the boot manager into the master boot record.
  4. Reboot. You should now be able to boot into Solaris or Windows.
  5. Boot into Solaris and add the Kubuntu lines as mentioned above.
  6. If the Kubuntu grub had not been installed into the Kubuntu partition before, you might be able to do this from the Kubuntu live CD or a Linux rescue CD (I haven't tried that yet). If not, install Kubuntu again using the steps described in the first part of this blog entry.

Some remarks:

This is how the two FAT partitions look like after mounting them in OpenSolaris:

/dev/dsk/c3d0p0:1        55958     34547     21411  62% /p/sda1
/dev/dsk/c3d0p0:2 8481752 7093052 1388700 84% /p/sda8

These are the /etc/vfstab entries for mounting the two FAT partitions from OpenSolaris:

/dev/dsk/c3d0p0:1  /dev/rdsk/c3d0p0:1  /p/sda1  pcfs  2  yes  -
/dev/dsk/c3d0p0:2 /dev/rdsk/c3d0p0:2 /p/sda8 pcfs 2 yes -

This is how my partition table looks like, from a Linux fdisk /dev/sda point of view:

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbb88bb88

Device Boot Start End Blocks Id System
/dev/sda1 * 1 7 56196 6 FAT16
/dev/sda2 8 1224 9775552+ bf Solaris
/dev/sda3 1225 4864 29238300 5 Extended
/dev/sda5 1225 3100 15068938+ 7 HPFS/NTFS
/dev/sda6 3101 3164 514048+ 82 Linux swap / Solaris
/dev/sda7 3165 3806 5156833+ 83 Linux
/dev/sda8 3807 4864 8498353+ b W95 FAT32

Please back up all your files before installing a new OS to your system! And as always in my blog, no guarantee, warranty, or similar, for anything! This is just a (hopefully error-free) documentation of how things worked for me. Maybe you'll find it useful.

阅读(2910) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2009-05-21 00:23:11

good,thanks a lot. I have same problem, I read this paper, so ,I have a solution.