Mark Davies | 1 Feb 07:40
Picon
Picon

boot selector and extended partitions

I'm trying to set up a new laptop to boot either NetBSD or Windows 7.

I've got the following fdisk

Disk: /dev/rsd0d
NetBSD disklabel disk geometry:
cylinders: 16383, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 312581808

BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 312581808

Partitions aligned to 16065 sector boundaries, offset 63

Partition table:
0: Dell PowerEdge Server utilities (sysid 222)
    start 63, size 433692 (212 MB, Cyls 0-26)
1: NTFS, OS/2 HPFS, QNX2 or Advanced UNIX (sysid 7)
    bootmenu: Windows
    start 434176, size 204800 (100 MB, Cyls 27/6/44-39/197/30), Active
2: NTFS, OS/2 HPFS, QNX2 or Advanced UNIX (sysid 7)
    start 638976, size 41738240 (20380 MB, Cyls 39/197/31-2637/219/14)
3: Ext. partition - LBA (sysid 15)
    start 42377216, size 270200832 (131934 MB, Cyls 
2637/219/15-19457/21/20)
Extended partition table:
E0: Primary DOS with 32 bit FAT (sysid 11)
    start 42379264, size 4194304 (2048 MB, Cyls 2637/251/47-2899/17/62)
E1: NetBSD (sysid 169)
(Continue reading)

Alan Barrett | 1 Feb 10:27
Gravatar

Re: boot selector and extended partitions

On Wed, 01 Feb 2012, Mark Davies wrote:
>Partition table:
>0: Dell PowerEdge Server utilities (sysid 222)
>    start 63, size 433692 (212 MB, Cyls 0-26)
>1: NTFS, OS/2 HPFS, QNX2 or Advanced UNIX (sysid 7)
>    bootmenu: Windows
>    start 434176, size 204800 (100 MB, Cyls 27/6/44-39/197/30), Active
>2: NTFS, OS/2 HPFS, QNX2 or Advanced UNIX (sysid 7)
>    start 638976, size 41738240 (20380 MB, Cyls 39/197/31-2637/219/14)
>3: Ext. partition - LBA (sysid 15)
>    start 42377216, size 270200832 (131934 MB, Cyls
>2637/219/15-19457/21/20)
>Extended partition table:
>E0: Primary DOS with 32 bit FAT (sysid 11)
>    start 42379264, size 4194304 (2048 MB, Cyls 2637/251/47-2899/17/62)
>E1: NetBSD (sysid 169)
>    bootmenu: NetBSD
>    start 46573631, size 266004417 (129885 MB, Cyls
>2899/17/63-19457/21/20)
>Bootselector enabled, timeout 10 seconds.
>First active partition: 1
>Drive serial number: 1744830464 (0x68000000)
>
>
>but if I try and boot I only get a menu comprising
>  1. Windows
>
>no NetBSD.  Is this because NetBSD is in an Extended partition?

I think that mbr_bootsel does not allow booting from extended
(Continue reading)

Mark Davies | 2 Feb 11:25
Picon
Picon

Re: boot selector and extended partitions

On Wednesday 01 February 2012 22:27:31 Alan Barrett wrote:
> I think that mbr_bootsel does not allow booting from extended
> partisions, but mbr_ext does.  (See mbr(8).)  In order to make
> space for the extra code needed for scanning extended partitions,
> mbr_ext sacrifices the ability to use CHS disk addressing (as
> opposed to LBA disk addressing).

So the issue then was the combination of using an extended partition and 
it being more than 8 Gig in.

I solved my problem by sacrificing the "Dell PowerEdge Server utilities" 
partition (don't really know why it was there) and using that partition 
slot for the NetBSD chunk of the disk.

cheers
mark

David Laight | 2 Feb 19:58
Picon

Re: boot selector and extended partitions

On Thu, Feb 02, 2012 at 11:25:46PM +1300, Mark Davies wrote:
> On Wednesday 01 February 2012 22:27:31 Alan Barrett wrote:
> > I think that mbr_bootsel does not allow booting from extended
> > partisions, but mbr_ext does.  (See mbr(8).)  In order to make
> > space for the extra code needed for scanning extended partitions,
> > mbr_ext sacrifices the ability to use CHS disk addressing (as
> > opposed to LBA disk addressing).
> 
> So the issue then was the combination of using an extended partition and 
> it being more than 8 Gig in.

No - you just needed to use fdisk to copy in the mbr code that supports
reading the extended partition list.

The LBA read support probably isn't needed on anything newer than a PII.

	David

--

-- 
David Laight: david <at> l8s.co.uk

Mark Davies | 2 Feb 20:13
Picon
Picon

Re: boot selector and extended partitions

On Friday 03 February 2012 07:58:10 David Laight wrote:
> No - you just needed to use fdisk to copy in the mbr code that supports
> reading the extended partition list.

I did try that first (fdisk -c /usr/mdec/mbr_ext sd0) and it made no 
difference.

cheers
mark

Greg A. Woods | 3 Feb 01:24
X-Face
Favicon

netbsd-5 on Citrix XenClient 2.1 (on an HP EliteBook 8460p)

For anyone interested, here's a dmesg from a rather verbose but
otherwise mostly GENERIC-like kernel booting on Citrix XenClient-2.1 on
an HP EliteBook 8460p.

There's a dmesg from the same kernel config running on the bare metal
here:  http://mail-index.netbsd.org/current-users/2012/01/24/msg018897.html

I have enabled the "expose physical hardware information" and "expose
physical OEM hardware" options in the VM "Advanced" panel, though I
didn't have them enabled during the install.

I noted some weird issues with "pauses" during installation, and they
continued on during multiuser runtime too.  I also had it go completely
catatonic just now and had to force a reboot from the Xen control panel.
I think it may have recovered eventually though -- sometimes these
pauses seem rather long.

re0 (and re1 when the wireless is active) is throwing "watchdog timeout"
warnings on the kernel which may correspond to some of the freezes.

dhclient can get addresses on both re0 and re1, but then neither work.
If I restrict it to just re0 then networking seems to work (and I'm
pretty sure that's over the hard-wired ethernet port).

Networking doesn't work very well though.  'ping -f' gets a lot of
packet loss, and is very slow sending.  Scp can't move big files, but it
can move small files.  The Windoze-7 VM doesn't seem to have any trouble
with networking -- it was able to retrieve all its many updates OK.

Audio doesn't work, despite lots of mention in the dmesg.  Even the
(Continue reading)

Stephen Borrill | 3 Feb 09:29
Picon
Favicon

Re: netbsd-5 on Citrix XenClient 2.1 (on an HP EliteBook 8460p)

On Thu, 2 Feb 2012, Jeff Rizzo wrote:
> On 2/2/12 4:24 PM, Greg A. Woods wrote:
>> re0 (and re1 when the wireless is active) is throwing "watchdog timeout"
>> warnings on the kernel which may correspond to some of the freezes.
>
> This is a known issue;  most Xen implementations don't provide interrupts 
> properly for the re(4) driver, but it actually works OK if you let the rtk(4) 
> driver match, either by commenting out re(4) or using userconf to disable re, 
> which you can do from boot.cfg.  I don't know whether Xenserver allows you to 
> change the emulation, but the wm(4) one works better.  :)

XenServer != XenClient

I've had NetBSD running on XenClient since the pre-1.0 tech preview days 
and haven't noticed the pauses.

After my 2.1 upgrade^Wreinstall, I've not had chance to put NetBSD back on 
yet. However, my interest is mainly in getting it to run as a PV guest 
rather than HVM. My work on generating .xva files for XenServer and 
importing the relevant guest tools into pkgsrc has been good. So it 
shouldn't be much of a leap to get it working under XenClient too.

There are a few problems/trickinesses however:
- In depth VM config cannot be altered from gui, so the JSON-like db files 
must be manually altered. The syntax is not publically documented.
- There's no serial console-like mechanism, so getting a console could be 
tough. XenServer is happy with text-based PV consoles and attaches a vnc 
instance to them. XenClient doesn't have that functionality.

I've chatted to some of the Citrix senior engineers about this. For the 
(Continue reading)

Greg A. Woods | 6 Feb 21:55
X-Face
Favicon

Re: netbsd-5 on Citrix XenClient 2.1 (on an HP EliteBook 8460p)

At Thu, 02 Feb 2012 17:00:00 -0800, Jeff Rizzo <riz <at> netbsd.org> wrote:
Subject: Re: netbsd-5 on Citrix XenClient 2.1 (on an HP EliteBook 8460p)
> 
> On 2/2/12 4:24 PM, Greg A. Woods wrote:
> > re0 (and re1 when the wireless is active) is throwing "watchdog timeout"
> > warnings on the kernel which may correspond to some of the freezes.
> 
> This is a known issue;  most Xen implementations don't provide
> interrupts properly for the re(4) driver, but it actually works OK if
> you let the rtk(4) driver match, either by commenting out re(4) or
> using userconf to disable re, which you can do from boot.cfg.  I don't
> know whether Xenserver allows you to change the emulation, but the
> wm(4) one works better.  :)

Excellent hint, thanks!

Yes, preventing re(4) from being used (and thus allowing rtk(4) to be
used, solved both the networking problems, as well as the periodic
"freezing" of the system.

Unfortunately I cannot use boot.cfg to send commands to userconf(4) on
NetBSD-5 -- unless I pull up the changes needed to do so I guess.

Perhaps re(4) should be made smart enough to recognise situations where
it would cause more trouble than it would be worth and to prevent itself
from being attached in those situations.

Either that or maybe the support for the unique chips it alone can
handle should be migrated to rtk(4) and re(4) should be sent to the bit
bucket.  (That's said with my only, at least even semi-recent,
(Continue reading)

Joerg Sonnenberger | 6 Feb 22:03
Picon

Re: netbsd-5 on Citrix XenClient 2.1 (on an HP EliteBook 8460p)

On Mon, Feb 06, 2012 at 12:55:55PM -0800, Greg A. Woods wrote:
> Either that or maybe the support for the unique chips it alone can
> handle should be migrated to rtk(4) and re(4) should be sent to the bit
> bucket.  (That's said with my only, at least even semi-recent,
> experience with the both of them being now with XenClient.)

re(4) uses a completely different DMA path, which is wastly superior to
rtk(4), so that wouldn't be an improvement.

Joerg


Gmane