How to modify fstab and grub to add a partition before the linux system on the hard disk.

Source: Internet
Author: User
How to modify fstab and grub to add a partition before the linux system on the hard disk. -- Linux general technology-Linux technology and application information. For details, refer to the following section. I want to add a partition in front of the linux system on the hard disk. How can I modify fstab and grub? What else do I need to pay attention?
My partitions:

Device Boot Start End Blocks Id System ### XP
/Dev/sda1*1 1958 15727603 + 7 HPFS/NTFS
/Dev/sda2 1959 19456 140552685 f W95 Ext 'd (LBA) C drive
/Dev/sda5 1959 3916 15727603 + 7 HPFS/NTFS d
/Dev/sda6 3917 6527 20972826 7 HPFS/NTFS e
/Dev/sda7 6528 11749 41945683 + 7 HPFS/NTFS f
/Dev/sda8 11750 16318 36700461 7 HPFS/NTFS g
The 10 Gb unused space just extracted from sda8 has not yet been formatted as ext3. After formatting, the previous sda9 should be changed to sda10. How can we change fstab and grub, and grub.
/Dev/sda9 17624 19195 12627058 + 83 Linux/
/Dev/sda10 19196 19456 2096451 82 Linux swap/Solaris

My current fstab:
LABEL = // ext3 defaults 1 1
Tmpfs/dev/shm tmpfs defaults 0 0
Devpts/dev/pts devpts gid = 5, mode = 620 0 0
Sysfs/sys sysfs defaults 0 0
Proc/proc defaults 0 0
LABEL = SWAP-sda10 swap defaults 0 0
/Dev/sda5/mnt/windows_d ntfs umask = 000, nls = utf8
/Dev/sda8/mnt/windows_g ntfs umask = 000, nls = utf8
/Dev/sda6/mnt/windows_e ntfs umask = 000, nls = utf8
/Dev/sda7/mnt/windows_f ntfs umask = 000, nls = utf8

In the past, the root directory is not marked with-sda9, so you do not need to change the root partition.
LABEL =/-sda10/ext3 defaults 1 1
Is swap changed to sda11?
LABEL = SWAP-sda11 swap defaults 0 0

The grub menu is as follows:
# Grub. conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a/boot partition. This means that
# All kernel and initrd paths are relative to/, eg.
# Root (hd0, 8) ### this is changed to hd0, 9
# Kernel/boot/vmlinuz-version ro root =/dev/sda9 ### change to sda10
# Initrd/boot/initrd-version.img
# Boot =/dev/sda
Default = 0
Timeout = 5
Splashimage = (hd0, 8)/boot/grub/splash.xpm.gz ### (hd0, 8) to (hd0, 9)
Hiddenmenu
Title Fedora (2.6.23.1-10. fc7)
Root (hd0, 8) ### (hd0, 8) change to (hd0, 9)
Kernel/boot/vmlinuz-2.6.23.1-10.fc7 ro root = LABEL =/acpi = off noapic rhgb quiet
Initrd/boot/initrd-2.6.23.1-10.fc7.img
Title Windows XP
Rootnoverify (hd0, 0)
Chainloader + 1

After this change, can I format the partition and restart it ?? Ask! Thank you !!
Related Article

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.