Fix rewrite grub and MBR for Ubuntu startup items

Source: Internet
Author: User

--------------

A summary of multiple systems over the past few days:

Ubuntu ext4/dev/sda7 xp ntfs/dev/SA1 fedora EX3/dev/sda4 swap/dev/sda8

In
After Ubuntu is installed... it is very easy to install oracle... and now it is very easy to use cross-platform... try the latest software again...
Therefore, the installation of Fedora has also been put on the agenda... in fact, it is quite difficult to say... but it succeeded in the end... the tangle in the middle is hard to say... The following is a summary:

$ SU/sudo su // check the situation

Passward :***

# Mkdir/mnt/sda7

# Mount/dev/sda7/mnt/sda7

# Chroot/mnt/sda7

# Grub-install -- root-directory =/mnt/sda7/dev/SDA // note the format and space...

# Find/boot/GRUB/stage1

(Hd0, 3)
(Hd0, 6)

# Root (hd0, 6)

# Setup (hd0)

# Quit.

At this time, grub has actually written the boot information into MBR... but it still makes a Startup menu...

# Mkdir/mnt/sda4

# Mount/dev/sda4/mnt/sda4

# Chroot/mnt/sda4

# Vim/boot/GRUB/menu. lst // press I to enter insert mode: WQ save and exit

// Copy the content.

// Title fedora (2.6.29.4-167. fc11.i686. PAE)
// Root (hd0, 3)
// Kernel/boot/vmlinuz-2.6.29.4-167.fc11.i686.PAE Ro root = UUID = b20a8d0c-0b56-4d63-8735-8dadd52117cc rhgb quiet
// Initrd/boot/initrd-2.6.29.4-167.fc11.i686.PAE.img

// Depends on the kernel version... copy... it is hard to imagine that people can write it...
// The same method... Go to sda7 and copy the boot guide information of ubuntu.

// Title Ubuntu 9.04, memtest86 +
// UUID 1da217f5-773d-4aa1-aa12-6915671780d7
// Kernel/boot/memtest86 +. Bin
// Quiet

// Title Microsoft Windows XP Professional
// Root (hd0, 0)
// Makeactive
// Chainloader + 1

// The XP boot information is also provided above... follow the image gourd... use fdisk to view the drive letter. Note that lower case l is not a pipe character. |

[Root @ qzidsktp qzi] # fdisk-l

Disk/dev/SDA: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Disk identifier: 0x624aa2e0

Device boot start end blocks ID system
/Dev/sda1*1 2432 19535008 + 7 HPFs/NTFS
/Dev/sda2 2433 16051 109394617 + F w95 ext 'd (LBA)
/Dev/sda3 19066 19457 3148740 1C hidden w95 FAT32 (LBA)
/Dev/sda4 16052 18219 17414460 83 Linux
/Dev/sda5 2433 7904 43953808 + B w95 FAT32
/Dev/sda6 7905 13376 43953808 + B w95 FAT32
/Dev/sda7*13377 15808 19535008 + 83 Linux
/Dev/sda8 15809 16051 1951866 82 Linux swap/Solaris

// The last part is:

# Boot // reboot successful

Unfortunately... my drive C is in NTFS format... ext4 for Ubuntu... fedora uses ext3... how inconvenient is there... people who have experienced it will know...

This method can solve a lot of installation problems... save a disk on this network... when did you accidentally shut down the system... maybe you can find it on the Internet... and you can share with us...

PS: Actually, there are various livecd methods... but I don't think it's necessary to use a disk every time... you can use grub for DOS to add one more grub to the startup Item of XP and then set the installation...

The following describes how to install these two systems:

Title install Ubuntu

Root (hd0, 6)

Kernel (hd0, 0)/vmlinuz boot = Casper iso-Scan/filename =/ubuntu-9.04-desktop-i386.iso Ro quiet

Splash locale = zh_CN.UTF-8

Initrd (hd0, 0)/initrd.gz

Title install Fedora

# Root (hd0, 5)

Kernel (hd0, 0)/vmlinuz

# Root =/dev/sda6 Ro liveimg rhgb

Initrd (hd0, 0)/initrd. img

If Debian is used, you may be familiar with some configurations during this period... By the way, you may need to provide the parameters that may be used.

Find/vmlinuz

In addition, fedora specifies the ISO position... for example, put it in E: // fedora ***. ISO and E: // fedora/images:/dev/sda6/Fedora/images/install

Ah... it's a very troublesome task... but it's not always killed... bored... all the people who finally have the chance to use this content say: Good luck!

 

 

 

 

I also transferred it to the UBUNTU Forum:

 

Http://forum.ubuntu.org.cn/viewtopic.php? F = 77 & t = 221290

 

Http://user.qzone.qq.com/405178980/infocenter? Ptlang= 2052

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.