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

How to adjust the boot sequence of multiple systems by Ubuntu

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article introduces the relevant knowledge of "how to adjust the startup order of multiple systems by Ubuntu". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

After we enter Ubuntu, open the terminal and back up the startup list file menu.lst of Grub:

The code is as follows:

Sudo cp / boot/grub/menu.lst / boot/grub/menu.lst.bak

Then use Gedit to edit menu.lst

The code is as follows:

Sudo gedit / boot/grub/menu.lst

When you open it, you will see very long things, but all those things that start with "#" are useless, and there is only one place we need to change (about 18 lines): default 0

This 0 means that the default startup item for Grub is Ubuntu, and we want to change it to. This is due to the machine. Let's move on.

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

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

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

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

# # default num

# Set the default entry to the entry number NUM. Numbering starts from 0, and

# the entry number 0 is the default if the command is not used.

#

# You can specify 'saved' instead of a number. In this case, the default entry

# is the entry saved with the command 'savedefault'.

# WARNING: If you are using dmraid do not use 'savedefault' or your

# array will desync and will not let you boot your system.

Default 0

# # timeout sec

# Set a timeout, in SEC seconds, before automatically booting the default entry

# (normally the first entry defined).

Timeout 10

# # hiddenmenu

# Hides the menu by default (press ESC to see the menu)

# hiddenmenu

# Pretty colours

# color cyan/blue white/blue

# # password ['--md5'] passwd

# If used in the first section of a menu file, disable all interactive editing

# control (menu entry editor and command-line) and entries protected by the

# command 'lock'

# e.g. Password topsecret

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

# password topsecret

#

# examples

#

# title Windows 95/98/NT/2000

# root (hd0,0)

# makeactive

# chainloader + 1

#

# title Linux

# root (hd0,1)

# kernel / vmlinuz root=/dev/hda2 ro

#

#

# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

# BEGIN AUTOMAGIC KERNELS LIST

# # lines between the AUTOMAGIC KERNELS LIST markers will be modified

# # by the debian update-grub script except for the default options below

# # DO NOT UNCOMMENT THEM, Just edit them to your needs

# Start Default Options # #

# # default kernel options

# # default kernel options for automagic boot options

# # If you want special options for specific kernels use kopt_x_y_z

# # where x.y.z is kernel version. Minor versions can be omitted.

# # e.g. Kopt=root=/dev/hda1 ro

# # kopt_2_6_8=root=/dev/hdc1 ro

# # kopt_2_6_8_2_686=root=/dev/hdc2 ro

# kopt=root=UUID=898431cf-4249-4de1-a492-7e2f4afd49a9 ro locale=zh_CN

# # default grub root device

# # e.g. Groot= (hd0,0)

# groot=3738b672-62f3-490d-916a-cad379fdb57b

# # should update-grub create alternative automagic boot options

# # e.g. Alternative=true

# # alternative=false

# alternative=true

# # should update-grub lock alternative automagic boot options

# # e.g. Lockalternative=true

# # lockalternative=false

# lockalternative=false

# # additional options to use with the default boot option, but not with the

# # alternatives

# # e.g. Defoptions=vga=791 resume=/dev/hda5

# defoptions=quiet splash

# # should update-grub lock old automagic boot options

# # e.g. Lockold=false

# # lockold=true

# lockold=false

# # Xen hypervisor options to use with the default Xen boot option

# xenhopt=

# # Xen Linux kernel options to use with the default Xen boot option

# xenkopt=console=tty0

# # altoption boot targets option

# # multiple altoptions lines are allowed

# # e.g. Altoptions= (extra menu suffix) extra boot options

# # altoptions= (recovery) single

# altoptions= (recovery mode) single

# # controls how many kernels should be put into the menu.lst

# # only counts the first occurence of a kernel, not the

# # alternative kernel options

# # e.g. Howmany=all

# # howmany=7

# howmany=all

# # should update-grub create memtest86 boot option

# # e.g. Memtest86=true

# # memtest86=false

# memtest86=true

# # should update-grub adjust the value of the default booted system

# # can be true or false

# updatedefaultentry=false

# # should update-grub add savedefault to the default options

# # can be true or false

# savedefault=false

# End Default Options # #

Title Ubuntu 8.10, kernel 2.6.27-11-generic

Uuid 3738b672-62f3-490d-916a-cad379fdb57b

Kernel / vmlinuz-2.6.27-11-generic root=UUID=898431cf-4249-4de1-a492-7e2f4afd49a9 ro locale=zh_CN quiet splash

Initrd / initrd.img-2.6.27-11-generic

Quiet

Title Ubuntu 8.10, kernel 2.6.27-11-generic (recovery mode)

Uuid 3738b672-62f3-490d-916a-cad379fdb57b

Kernel / vmlinuz-2.6.27-11-generic root=UUID=898431cf-4249-4de1-a492-7e2f4afd49a9 ro locale=zh_CN single

Initrd / initrd.img-2.6.27-11-generic

Title Ubuntu 8.10, kernel 2.6.27-7-generic

Uuid 3738b672-62f3-490d-916a-cad379fdb57b

Kernel / vmlinuz-2.6.27-7-generic root=UUID=898431cf-4249-4de1-a492-7e2f4afd49a9 ro locale=zh_CN quiet splash

Initrd / initrd.img-2.6.27-7-generic

Quiet

Title Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)

Uuid 3738b672-62f3-490d-916a-cad379fdb57b

Kernel / vmlinuz-2.6.27-7-generic root=UUID=898431cf-4249-4de1-a492-7e2f4afd49a9 ro locale=zh_CN single

Initrd / initrd.img-2.6.27-7-generic

Title Ubuntu 8.10, memtest86+

Uuid 3738b672-62f3-490d-916a-cad379fdb57b

Kernel / memtest86+.bin

Quiet

# END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian

# ones.

Title Other operating systems:

Root

# This entry automatically added by the Debian installer for a non-linux OS

# on / dev/sda1

Title Microsoft Windows XP Professional

Root (hd0,0)

Savedefault

Makeactive

Chainloader + 1

Well, I marked each of the following parts with seven different colors, numbered 0, 1, 2, 3, 4, 5, 6. So we see that the number of the WinXP system is 6, so all we have to do is change default 0 to default 6.

This is my computer. The number of XP is 6. Your computer needs to see for yourself how much it is.

This is the end of the content of "how to adjust the boot order of multiple systems by Ubuntu". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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