Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution to the Grub problem repaired by Ubuntu

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Ubuntu repair Grub problem solution, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

Please destroy the GRUB for a few days, repair it with LIVECD, enter the graphical interface with LIVECD, open the terminal and enter the command:

$sudosu

$grub

Grub > boot (hd0,6) / * originally I loaded the kernel (hd0,7), but somehow the sector where the kernel is located has changed * /

Grub > setup (hd0)

Restart the computer and find that grub cannot be invited into linux

Follow the prompts below GRUB and press E to edit the preferences.

Change (hd0,6) to (hd0,7)

Press B key to start, you can enter linux

Modify the relevant startup items in the / boot/grub/menu.list file after entering

If you don't start the computer in the future, you don't have to change the startup options of GRUB. Repair grub under ubuntu

1. Start with LiveCD

two。 Open a terminal, run the $sudogrub command (it may take a while here), and you will see the prompt grubupdate like 'grub >'.

3. Type find/boot/grub/stage1 at the prompt 'grub >' and you will get a run result, such as (hd0,3) on my machine (this command is actually to find out the partition where / boot is located)

4. Run grub > root (hd0,3) (this location should be filled with the running results on your machine)

5. Several lines of prompt appear when running grub > setup (hd0), and * * is ".succeeded" repaired successfully!

6. Run quit

8. Restart the computer and remove the liveCD

# menu.lst-See:grub (8), infogrub,update-grub (8)

# grub-install (8), grub-floppy (8)

# grub-md5-crypt,/usr/share/doc/grub

# and/usr/share/doc/grub-doc/.

# # defaultnum

# SetthedefaultentrytotheentrynumberNUM.Numberingstartsfrom0,and

# theentrynumber0isthedefaultifthecommandisnotused.

#

# Youcanspecify'saved'insteadofanumber.Inthiscase,thedefaultentry

# istheentrysavedwiththecommand'savedefault'.

# WARNING:Ifyouareusingdmraiddonotuse'savedefault'oryour

# arraywilldesyncandwillnotletyoubootyoursystem.

Default1

# # timeoutsec

# Setatimeout,inSECseconds,beforeautomaticallybootingthedefaultentry

# (normallythefirstentrydefined).

Timeout3

# # hiddenmenu

# Hidesthemenubydefault (pressESCtoseethemenu)

# hiddenmenu

# Prettycolours

# colorcyan/bluewhite/blue

# # password ['--md5'] passwd

# Ifusedinthefirstsectionofamenufile,disableallinteractiveediting

# control (menuentryeditorandcommand-line) andentriesprotectedbythe

# command'lock'

# e.g.passwordtopsecret

# password--md5 $1 $gLhU0/$aW78kHK1QfV3P2b2znUoe/

# passwordtopsecret

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report