Redirect Grub or copy new boot

Mark Sargent powderkeg at snow.email.ne.jp
Mon Mar 14 14:06:36 UTC 2005


Paul Howarth wrote:

> Mark Sargent wrote:
>
>> Mark Sargent wrote:
>>
>>> Paul Howarth wrote:
>>>
>>>> On Sat, 2005-03-12 at 20:24 +0900, Mark Sargent wrote:
>>>>  
>>>>
>>>>> Paul Howarth wrote:
>>>>>
>>>>>  
>>>>>
>>>>>> On Sat, 2005-03-12 at 16:24 +0900, Mark Sargent wrote:
>>>>>>
>>>>>>
>>>>>>   
>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> after not finding any solution for my previous FC2 
>>>>>>> install(couldn't load X system), I went ahead and did a fresh 
>>>>>>> install of FC3 on to another partition. I didn't create another 
>>>>>>> boot partition, as I was thinking I could either redirect grub 
>>>>>>> to the boot dir for the new install or copy the dir/files onto 
>>>>>>> the existing boot partition. Which way would you do/have done 
>>>>>>> it..? Cheers.
>>>>>>>
>>>>>>> new install = /dev/hda5
>>>>>>> boot partition = /dev/hda9
>>>>>>> old install = /dev/hda12
>>>>>>>  
>>>>>>>       
>>>>>>
>>>>>>
>>>>>>
>>>>>> I usually install with multiple partitions/logical volumes anyway.
>>>>>>
>>>>>> I assume that your entire new installation went into /dev/hda5 
>>>>>> and you
>>>>>> didn't tell the installer to re-use the existing /boot partition
>>>>>> in /dev/hda9?
>>>>>>
>>>>>> You can configure your existing FC2 grub to chain-load the FC3 grub
>>>>>>     from /dev/hda5, or you could copy the grub.conf kernel 
>>>>>> entries from your
>>>>>
>>>>>
>>>>>
>>>>>  
>>>>>
>>>>>> FC3 install into your FC2 grub.conf. I would do the former rather 
>>>>>> than
>>>>>> the latter, because the latter would require you to repeat the 
>>>>>> operation
>>>>>> every time you upgraded the FC3 kernel.
>>>>>>
>>>>>> If you post the output of "fdisk -l /dev/hda" and your FC2 grub.conf
>>>>>> file, you might get more specific help.
>>>>>>
>>>>>> Paul.
>>>>>>
>>>>>>
>>>>>>     
>>>>>
>>>>>
>>>>>
>>>>> Hi All,
>>>>>
>>>>> here is what was asked for. FC2 grub.conf and fdisk output,
>>>>>
>>>>> Grub:
>>>>> # grub.conf generated by anaconda
>>>>> #
>>>>> # Note that you do not have to rerun grub after making changes to 
>>>>> this file
>>>>> # NOTICE:  You have a /boot partition.  This means that
>>>>> #          all kernel and initrd paths are relative to /boot/, eg.
>>>>> #          root (hd0,9)
>>>>> #          kernel /vmlinuz-version ro root=/dev/hda11
>>>>> #          initrd /initrd-version.img
>>>>> #boot=/dev/hda
>>>>> default=0
>>>>> timeout=10
>>>>> splashimage=(hd0,8)/grub/splash.xpm.gz
>>>>> password --md5 $1$zVCW8EN2$ZVsfDdJMJGmcxb/qge15k0
>>>>> title Fedora Core (2.6.10-1.14_FC2)
>>>>>    root (hd0,8)
>>>>>    kernel /vmlinuz-2.6.10-1.14_FC2 ro root=LABEL=/ rhgb quiet
>>>>>    initrd /initrd-2.6.10-1.14_FC2.img
>>>>> title Fedora Core (2.6.10-1.12_FC2)
>>>>>    root (hd0,8)
>>>>>    kernel /vmlinuz-2.6.10-1.12_FC2 ro root=LABEL=/ rhgb quiet
>>>>>    initrd /initrd-2.6.10-1.12_FC2.img
>>>>> title Fedora Core (2.6.9-1.11_FC2)
>>>>>    root (hd0,8)
>>>>>    kernel /vmlinuz-2.6.9-1.11_FC2 ro root=/dev/hda12 rhgb quiet
>>>>>    initrd /initrd-2.6.9-1.11_FC2.img
>>>>> title Fedora Core (2.6.9-1.6_FC2)
>>>>>    root (hd0,8)
>>>>>    kernel /vmlinuz-2.6.9-1.6_FC2 ro root=/dev/hda12 rhgb quiet
>>>>>    initrd /initrd-2.6.9-1.6_FC2.img
>>>>> title Fedora Core (2.6.5-1.358)
>>>>>    root (hd0,8)
>>>>>    kernel /vmlinuz-2.6.5-1.358 ro root=/dev/hda12 rhgb quiet
>>>>>    initrd /initrd-2.6.5-1.358.img
>>>>> title Windows
>>>>>    rootnoverify (hd0,0)
>>>>>    chainloader +1
>>>>>   
>>>>
>>>>
>>>>
>>>>
>>>> My, what a lot of kernels you still have!
>>>>
>>>>  
>>>>
>>>>> FDisk:
>>>>> Disk /dev/hda: 45.0 GB, 45020602368 bytes
>>>>> 255 heads, 63 sectors/track, 5473 cylinders
>>>>> Units = cylinders of 16065 * 512 = 8225280 bytes
>>>>>
>>>>>   Device Boot      Start         End      Blocks   Id  System
>>>>> /dev/hda1   *           1         510     4096543+   b  W95 FAT32
>>>>> /dev/hda2             511        5473    39865297+   f  W95 Ext'd 
>>>>> (LBA)
>>>>> /dev/hda5   *         511        1020     4096543+   7  HPFS/NTFS
>>>>> /dev/hda6            1021        2138     8980303+   b  W95 FAT32
>>>>> /dev/hda7            2139        3688    12450343+   7  HPFS/NTFS
>>>>> /dev/hda8            3689        3943     2048256    b  W95 FAT32
>>>>> /dev/hda9            3944        3956      104391   83  Linux
>>>>> /dev/hda10           3957        4086     1044193+  82  Linux swap
>>>>> /dev/hda11           4087        4596     4096543+   b  W95 FAT32
>>>>> /dev/hda12           4709        5473     6144831   83  Linux
>>>>>
>>>>> Paul, I also tried to point grub to the partition like below, but, 
>>>>> it generated errors,
>>>>>
>>>>> root (hd0,4)
>>>>> filesystem type unknown, partition type 0x7
>>>>>
>>>>> setup (hd0)
>>>>> Error 17: Cannot mount selected partition
>>>>>   
>>>>
>>>>
>>>>
>>>>
>>>> Didn't you install grub in /dev/hda5 during your FC3 install? If 
>>>> so, why
>>>> are you trying to reinstall grub?
>>>>
>>>>  
>>>>
>>>>> Don't un this, as I can mount the partition under the old install 
>>>>> like so,
>>>>>
>>>>> mount -t ext3 /dev/hda5 /mnt/hda5
>>>>>
>>>>> And, I also don' un why it shows as HPFS/NTFS when I formatted as 
>>>>> ext3.
>>>>>   
>>>>
>>>>
>>>>
>>>>
>>>> The partition type entries in the partition table don't have to
>>>> accurately represent the filesystems those partitions are formatted
>>>> with, but it causes some confusion (e.g. for grub) when they don't. 
>>>> You
>>>> can use fdisk ("t" command) to fix the partition types. Did you 
>>>> delete a
>>>> 4GB NTFS partition and use the space to install FC3?
>>>>
>>>> If you installed grub in the root partition (/dev/hda5, not the MBR)
>>>> during your FC3 install, you should already have grub installed in
>>>> (hd0,4) and the following addition to your FC2 grub.conf should be
>>>> sufficient to run it:
>>>>
>>>> title Fedora Core 3
>>>>    rootnoverify (hd0,4)
>>>>    chainloader +1
>>>>
>>>> Paul.
>>>>  
>>>>
>>> Hi All,
>>>
>>> Paul, I got the following at boot,
>>>
>>> Error 13: Invalid or unsupported executable format
>>>
>>> I also made the change with the t command in fdisk, and made the ID 
>>> = 83. I definitely have a /boot dir on hd4. Cheers.
>>
>
> So you probably did not install grub on /dev/hda5 when you did the FC3 
> installation.
>
>> below is the output of the boot dir on hda5,
>>
>> total 2.6M
>> drwxr-xr-x   3 root root 4.0K Mar 12 21:45 .
>> drwxr-xr-x  23 root root 4.0K Mar  7 23:19 ..
>> -rw-r--r--   1 root root    0 Mar 12 21:45 bootdiroutput
>> -rw-r--r--   1 root root  50K Nov  3 04:53 config-2.6.9-1.667
>> drwxr-xr-x   2 root root 4.0K Mar  7 23:20 grub
>> -rw-r--r--   1 root root 384K Mar  7 22:58 initrd-2.6.9-1.667.img
>> -rw-r--r--   1 root root 698K Nov  3 04:53 System.map-2.6.9-1.667
>> -rw-r--r--   1 root root 1.4M Nov  3 04:53 vmlinuz-2.6.9-1.667
>>
>> Cheers.
>>
>> P.S. bootdiroutput is the file created that contains this output.(if 
>> that makes any sense).
>
>
> Try booting from the FC3 rescue CD, get to the command prompt, and do:
>
> # chroot /mnt/sysimage
> # grub-install /dev/hda5
> # reboot
>
> See how that goes.
>
> Paul.
>
Hi All,

Paul, thanx, but, I got 2 types of errors,

The file /boot/grub/stage1 not read correctly,

and then this when attempting to reboot,

init: /dev/initctl: no such file or directory

Getting to be a laugh, eh...cheers.

Mark Sargent.




More information about the fedora-list mailing list