Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ grub boot error resolution examples     - Linux performance optimization features Tuned and ktune (Linux)

- CentOS6 5 Configure SSH password Free (Linux)

- CentOS 6.7 install Nagios Tutorials (Server)

- Getting Started with Linux system to learn: how to use tcpdump to capture TCP SYN, ACK and FIN packets (Linux)

- Linux how to handle file names that contain spaces and special characters (Linux)

- Android design patterns - state mode (Programming)

- Quick Install software RAID on Linux (Linux)

- Linux platform Oracle MySQL connection (Database)

- Golang use Oracle database on Ubuntu 14.04 (Linux)

- KVM usb passthrough configuration (Linux)

- How to download GOG games in Linux command line (Linux)

- Oracle can not change the tablespace to backup mode in non-archive mode (Database)

- To share some very useful Vim command (Linux)

- Linux firewall iptables beginner tutorial (Linux)

- Ubuntu Tutorial: E: Failed to get lock / var / lib / apt / lists / lock - open (Linux)

- What is the Docker (Linux)

- To install Ganglia configuration of experience under CentOS 5.5 (Linux)

- MySQL various log summary (Database)

- How to fix apt-get update can not add a new CD-ROM error (Linux)

- Relationship between Linux permissions with the command (Linux)

  grub boot error resolution examples
  Add Date : 2018-11-21      
  My computer is on a total of two hard drives, a solid-state drive (sda) installed win7, another piece of regular hard drive (sdb) installed Ubuntu and CentOS two systems, guidance systems are installed in the boot sdb above the grub2 ubuntu it is responsible for selecting a different operating system to start, OK, explain the background over, then we began to talk about our problems.

Sdb last night to add a new partition, as follows:

Disk / dev / sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors / track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical / physical): 512 bytes / 4096 bytes
I / O size (minimum / optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xa887a887

  Device Boot Start End Blocks Id System
/ Dev / sdb1 2048 125829119 62913536 83 Linux
/ Dev / sdb2 125829246 970502711 422336733 f W95 Ext'd (LBA)
Partition 2 does not start on physical sector boundary.
/ Dev / sdb5 125829248 221983352 48077052+ 7 HPFS / NTFS / exFAT
/ Dev / sdb6 221983424 228274807 3145692 b W95 FAT32
/ Dev / sdb7 228274872 518603944 145164536+ 7 HPFS / NTFS / exFAT
/ Dev / sdb8 518604008 782021941 131708967 7 HPFS / NTFS / exFAT
/ Dev / sdb9 782024704 918054911 68015104 83 Linux
/ Dev / sdb10 918056960 934834175 8388608 83 Linux
/ Dev / sdb11 934836224 951613439 8388608 83 Linux
/ Dev / sdb12 951615488 960004095 4194304 82 Linux swap / Solaris
/ Dev / sdb13 960004159 970502711 5249276+ 83 Linux
Partition 13 does not start on physical sector boundary.

Wherein the sdb6 is my newly added partition line 13, because of this partition is added in the middle of the disk so it all leads to the back of the partition number changed (such as the root of the original centos installed in sdb8, has now become a sdb9 a) my ubuntu is installed in the root directory sdb1, since its partition number has not changed, so the system can start normally ubuntu, centos and the system will not start up!

I have not started to exclude error ah, I just started thinking about a boot problem, so I called in the following ubuntu update-grub command to update the look grub2 boot entry, update the result is this:

Generating grub configuration file ...
Found background image: ubuntu_kylin_grub_bg.tga
Found linux image: /boot/vmlinuz-3.13.0-46-generic
Found initrd image: /boot/initrd.img-3.13.0-46-generic
Found linux image: /boot/vmlinuz-3.13.0-32-generic
Found initrd image: /boot/initrd.img-3.13.0-32-generic
Found memtest86 + image: /boot/memtest86+.elf
Found memtest86 + image: /boot/memtest86+.bin
Found Windows 7 (loader) on / dev / sda1
Found CentOS release 6.6 (Final) on / dev / sdb9

Can be seen from the above, three operating systems are found, you should now be able to start a normal, and I tried to restart, centos startup or failure. . . .

Then I got thinking, my home directory and centos system var directory is a separate partition, it is not automatically activated when problems mount up, so I went to the centos modify / etc / fstab file, that I was with the partition number to identify the partition (such as / dev / sdb9 and the like), where I was all changed with the UUID to identify partitions. There is also learned a little trick, the original partition UUID numbers are stored in the / dev / disk / by-uuid / directory below are saved is a soft link, ll look you can see it a point to which hard drive

After I changed fstab, reboot the system again, or not found. That I was very depressed, and have been thinking about where is the problem? Then I looked again grub2 configuration file (grub.cfg), finally found the problem is in the startup command above, as follows:

menuentry 'CentOS release 6.6 (Final) (on / dev / sdb9)' --class gnu-linux --class gnu --class os $ menuentry_id_option 'osprober-gnulinux-simple-d24c3228-5ffc-4937-8411-a69681c3b54e' {
        insmod part_msdos
        insmod ext2
        set root = 'hd1, msdos9'
        if [x $ feature_platform_search_hint = xy]; then
          search --no-floppy --fs-uuid --set = root --hint-bios = hd1, msdos9 --hint-efi = hd1, msdos9 --hint-baremetal = ahci1, msdos9 d24c3228-5ffc-4937-8411 -a69681c3b54e
          search --no-floppy --fs-uuid --set = root d24c3228-5ffc-4937-8411-a69681c3b54e fi
        linux /boot/vmlinuz-2.6.32-504.12.2.el6.i686 ro root = / dev / sdb8 rd_NO_LUKS rd_NO_LVM LANG = en_US.UTF-8 rd_NO_MD SYSFONT = latarcyrheb-sun16 crashkernel = 128M KEYBOARDTYPE = pc KEYTABLE = us rd_NO_DM rhgb quiet vga = 791
        initrd /boot/initramfs-2.6.32-504.12.2.el6.i686.img

This is grub.cfg file on centos start part in the ninth row linux command, it chose a good kernel read-only command to mount the root file system when the selected partition is sdb8, but this time has sdb8 It became the windows of ntfs partition, so when my system starts, it will prompt a long list of unrecognized file system type (ntfs), as long as the change here sdb9, my system will be able to properly started!

After the start, I'm not happy how long, found running ubuntu again the following update-grub command, grub.cfg file has been overwritten. . No way, have to continue to analyze!

After analysis, we found that by the start of entry centos /etc/grub.d/30_os-prober configuration file generated in this document, linux-boot-prober command ultimately generate a file in the first grub.cfg 9 line command followed by the root partition name! And this linux-boot-prober command is to find the given partition name similar to "menu.lst" configuration file, the result I eventually found, the problem still lies in the configuration file centos system, as follows:

title CentOS (2.6.32-504.12.2.el6.i686)
        root (hd0,9)
        kernel /boot/vmlinuz-2.6.32-504.12.2.el6.i686 ro root = / dev / sdb8 rd_NO_LUKS rd_NO_LVM LANG = en_US.UTF-8 rd_NO_MD SYSFONT = latarcyrheb-sun16 crashkernel = 128M KEYBOARDTYPE = pc KEYTABLE = us rd_NO_DM rhgb quiet vga = 791
        initrd /boot/initramfs-2.6.32-504.12.2.el6.i686.img

I had just changed the second line of command root partition is selected, but no change in the third row root command to select the partition, so my system was not activated. .

OK, the centos profile changed, the problem is finally solved!
- Summary Linux bond of multi-interface load balancing (Linux)
- How to determine whether the Linux server was hacked (Linux)
- Linux Network Programming - signal blocking and shielding (block, unblock) (Programming)
- Gentoo: startx appeared Failed to load module Problem Solving (Linux)
- Linux network cut package is not fully defragment (Linux)
- Ubuntu the ARP (arptables) (Linux)
- Change all child files and subdirectories in the owner permissions Ubuntu (Linux)
- Scope of variables in C # (Programming)
- Android Studio Personalization (Linux)
- Generated characters using Java Videos (Programming)
- Windows Desktop use VNC remote connect Linux (Linux)
- Vim configuration instructions (Linux)
- To install Redis under Linux (Database)
- Learn about EditText little depth (Programming)
- MySQL database master never solve the synchronization method (Database)
- Ubucompilator-Ubuntu, Debian, Linux Mint created deb package of graphical tools (Linux)
- NGINX Plus now fully supports HTTP / 2 (Server)
- Camouflage Nginx Web server version to prevent invasion (Linux)
- Exploring the Android Listview display confusion (Programming)
- Ubuntu: To install chat client Chatty 0.6.1 (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.