恢复NetBSD启动管理

NetBSD的安装、升级、更新等日常问题请在这里讨论。

版主: lionux

回复
头像
lionux
锌 Zn
帖子: 457
注册时间: 2010-02-04 11:09

恢复NetBSD启动管理

帖子 lionux » 2010-04-11 21:59

NetBSD的启动管理还是比较实用的,在丢失启动管理后,有一键还原windows的可以用grub进入NetBSD,每次grub进入比较麻烦现在恢复启动管理。
修改启动标签:

代码: 全选

# fdisk -u
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 155061, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 156301488

BIOS disk geometry:
cylinders: 1024, heads: 190, sectors/track: 63 (11970 sectors/cylinder)
total sectors: 156301488

Partitions aligned to 11970 sector boundaries, offset 63

Do you want to change our idea of what BIOS thinks? [n] [color="Sienna"][I]回车[/I][/color]

代码: 全选

Partition table:
0: FreeBSD or 386BSD or old NetBSD (sysid 165)
    start 63, size 114105537 (55716 MB, Cyls 0-9532/119/63)
    [color="Sienna"]bootmenu: DraBSD #没有启动管理的没有这一行[/color]
1: <UNUSED>
2: <UNUSED>
3: NetBSD (sysid 169)
    [color="Sienna"]bootmenu: NetBSD #没有启动管理的没有这一行[/color]
    start 114109695, size 42186690 (20599 MB, Cyls 9532/185/1-13057/64/63), Active
Bootselector enabled, timeout 10 seconds.
First active partition: 3
Drive serial number: 2407531264 (0x8f800300)
Which partition do you want to change?: [none][color="Sienna"]0[/color]
可以看到0,1,2,3四个主分区,这里0分区安装的是DragonflyBSD,3分区安装的是NetBSD,先修改0分区,敲0回车

代码: 全选

The data for partition 0 is:
FreeBSD or 386BSD or old NetBSD (sysid 165)
    bootmenu: DraBSD
    start 63, size 114105537 (55716 MB, Cyls 0-9532/119/63)
sysid: [0..255 default: 165] [color="Sienna"][I]回车[/I][/color]
start: [0..13058cyl default: 63, 0cyl, 0MB] [color="Sienna"][I]回车[/I][/color]
size: [0..9533cyl default: 114105537, 9533cyl, 55716MB] [color="Sienna"][I]回车[/I][/color]
bootmenu: [DraBSD] [color="Sienna"]Dragonfly[/color] 
'Dragonfly' is longer than 8 characters.
bootmenu: [DraBSD] [color="Sienna"]Dragon[/color]
修改这里启动标签,不能超过8个字符,DraBSD改为了Dragon

代码: 全选

Partition table:
0: FreeBSD or 386BSD or old NetBSD (sysid 165)
    bootmenu: Dragon
    start 63, size 114105537 (55716 MB, Cyls 0-9532/119/63)
1: <UNUSED>
2: <UNUSED>
3: NetBSD (sysid 169)
    bootmenu: NetBSD
    start 114109695, size 42186690 (20599 MB, Cyls 9532/185/1-13057/64/63), Active
Bootselector enabled, timeout 10 seconds.
First active partition: 3
Drive serial number: 2407531264 (0x8f800300)
Which partition do you want to change?: [none] [color="Sienna"][I]其他分区也修改完毕后回车[/I][/color]

代码: 全选

We haven't written the MBR back to disk yet.  This is your last chance.
Partition table:
0: FreeBSD or 386BSD or old NetBSD (sysid 165)
    bootmenu: Dragon
    start 63, size 114105537 (55716 MB, Cyls 0-9532/119/63)
1: <UNUSED>
2: <UNUSED>
3: NetBSD (sysid 169)
    bootmenu: NetBSD
    start 114109695, size 42186690 (20599 MB, Cyls 9532/185/1-13057/64/63), Active
Bootselector enabled, timeout 10 seconds.
First active partition: 3
Drive serial number: 2407531264 (0x8f800300)
Should we write new partition table? [n] [color="Sienna"]y [I]确认写入[/I][/color]
启动选择设置

代码: 全选

# fdisk -B 

Boot selector configuration:
Timeout value (0 to 3600 seconds, -1 => never): [-1..3600 default: 10] [color="Sienna"][I]等待时间默认10秒[/I][/color]

代码: 全选

Select the default boot option. Options are:

0: The first active partition
1: Dragon
2: NetBSD
3: Harddisk 0
Default boot option: [0..3 default: 0] [color="Sienna"][I] 默认启动那个标签的系统[/I][/color]

代码: 全选

We haven't written the MBR back to disk yet.  This is your last chance.
Should we write new partition table? [n][color="Sienna"][I] y 确认更改写入MBR[/I][/color]

回复

在线用户

正浏览此版面之用户: 没有注册用户 和 24 访客