9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Grub Boot Problem
@ 2006-03-27  9:23 Laurent Malvert
  2006-03-27 12:41 ` Russ Cox
  0 siblings, 1 reply; 12+ messages in thread
From: Laurent Malvert @ 2006-03-27  9:23 UTC (permalink / raw)
  To: 9fans

Hi everybody,

I am a total newbie with Plan9 and I wanted to five it a try for a long time.
I decided to install it this week, and the installation went
surprisingly good, I was expecting something much less user-friendly
(well...)

But when I reached the bootsetup part, I was a little confused to see
that I had only the choice between a floppy boot sidk (no floppy
drives), and updating a win* bootloader (no win*).
In addition to that, my hard drive on this machine is not sdC-, but
sdC1, I can't do anything about it, not allowed to get my hands on the
hardware or software configuration.

But I figured it would be alright as I had a Ubuntu Linux on the same
disk, so I stepped the bootsetp part and rebooted the system.
I then modified my grub config with the following entry:

title     Plan9
rootnoverify (hd0,2)
chainloader +1
makeactive
boot


here's what fdisk is giving me:
lo@MALVERTLAB:~$ sudo fdisk -l /dev/hdb

Disk /dev/hdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1         365     2931831   83  Linux
/dev/hdb2             366        5594    42001942+   f  W95 Ext'd (LBA)
/dev/hdb3   *        5595        7500    15309945   39  Plan 9
/dev/hdb5             366        1459     8787523+  83  Linux
/dev/hdb6            1460        3526    16603146   83  Linux
/dev/hdb7            3527        3891     2931831   83  Linux
/dev/hdb8            3892        4256     2931831   83  Linux
/dev/hdb9            4257        5107     6835626   83  Linux
/dev/hdb10           5108        5472     2931831   82  Linux swap / Solaris
/dev/hdb11           5473        5594      979933+  83  Linux


When I booted again and asked grub to boot on the 'Plan9' option, it
found the partition correctly, and displayed something much like:

PBS...I/O Error
Press any key to reboot.

Obviously there is something wront, could someone give me a hand with this ?


thanks in advance.

--
Laurent Malvert [laurent.malvert@gmail.com]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-27  9:23 [9fans] Grub Boot Problem Laurent Malvert
@ 2006-03-27 12:41 ` Russ Cox
  2006-03-27 13:04   ` David.Eckhardt, Dave Eckhardt
  2006-03-28  5:30   ` Laurent Malvert
  0 siblings, 2 replies; 12+ messages in thread
From: Russ Cox @ 2006-03-27 12:41 UTC (permalink / raw)
  To: 9fans

> But when I reached the bootsetup part, I was a little confused to see
> that I had only the choice between a floppy boot sidk (no floppy
> drives), and updating a win* bootloader (no win*).
> In addition to that, my hard drive on this machine is not sdC-, but
> sdC1, I can't do anything about it, not allowed to get my hands on the
> hardware or software configuration.

Presumably you told grub to swap the bios drive letters.
It's not clear to me how well that works for booting
Plan 9.  I've never tried it.  It's possible that the boot
sector doesn't pay attention to the remapping, so it
went looking for 9load on your hda, not hdb.

Russ



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-27 12:41 ` Russ Cox
@ 2006-03-27 13:04   ` David.Eckhardt, Dave Eckhardt
  2006-03-27 13:19     ` Russ Cox
  2006-03-28  5:30   ` Laurent Malvert
  1 sibling, 1 reply; 12+ messages in thread
From: David.Eckhardt, Dave Eckhardt @ 2006-03-27 13:04 UTC (permalink / raw)
  To: 9fans

> Presumably you told grub to swap the bios drive letters.

Is there some chance there is a pbs vs. pbslba issue?

Dave Eckhardt


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-27 13:04   ` David.Eckhardt, Dave Eckhardt
@ 2006-03-27 13:19     ` Russ Cox
  2006-03-28  5:35       ` Laurent Malvert
  0 siblings, 1 reply; 12+ messages in thread
From: Russ Cox @ 2006-03-27 13:19 UTC (permalink / raw)
  To: 9fans

> Is there some chance there is a pbs vs. pbslba issue?

Possibly, but it's unlikely.  The install script
switches to pbslba if 9fat ends more than 1G
into the disk, and his is 40G into the disk.

That's one thing to try though: boot from the CD,
draw a window, and run
	disk/format -b /386/pbslba /dev/sdC1/9fat

I just changed pbs and pbslba to print PBS1... and PBS2...
so that we won't have to wonder about this in the future.

Russ



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-27 12:41 ` Russ Cox
  2006-03-27 13:04   ` David.Eckhardt, Dave Eckhardt
@ 2006-03-28  5:30   ` Laurent Malvert
  2006-03-28 16:19     ` Russ Cox
  1 sibling, 1 reply; 12+ messages in thread
From: Laurent Malvert @ 2006-03-28  5:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 3/27/06, Russ Cox <rsc@swtch.com> wrote:
> > But when I reached the bootsetup part, I was a little confused to see
> > that I had only the choice between a floppy boot sidk (no floppy
> > drives), and updating a win* bootloader (no win*).
> > In addition to that, my hard drive on this machine is not sdC-, but
> > sdC1, I can't do anything about it, not allowed to get my hands on the
> > hardware or software configuration.
>
> Presumably you told grub to swap the bios drive letters.
> It's not clear to me how well that works for booting
> Plan 9.  I've never tried it.  It's possible that the boot
> sector doesn't pay attention to the remapping, so it
> went looking for 9load on your hda, not hdb.


I think I get what you mean, but why would it swap the drive letters ?
I mean if grub already found the right partition and started it, why
would it then mess up while calling 9load ?

That seems odd.
I'll keep looking.


--
Laurent Malvert [laurent.malvert@gmail.com]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-27 13:19     ` Russ Cox
@ 2006-03-28  5:35       ` Laurent Malvert
  2006-03-28  6:27         ` Laurent Malvert
  0 siblings, 1 reply; 12+ messages in thread
From: Laurent Malvert @ 2006-03-28  5:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 3/27/06, Russ Cox <rsc@swtch.com> wrote:
> > Is there some chance there is a pbs vs. pbslba issue?
>
> Possibly, but it's unlikely.  The install script
> switches to pbslba if 9fat ends more than 1G
> into the disk, and his is 40G into the disk.
>
> That's one thing to try though: boot from the CD,
> draw a window, and run
>         disk/format -b /386/pbslba /dev/sdC1/9fat
>
> I just changed pbs and pbslba to print PBS1... and PBS2...
> so that we won't have to wonder about this in the future.
>

thanks for the tip, I'll try that and keep you posted.
but...
little problem there...
I just remembered, I tried to use the LiveCD mode, but my mouse wasn't
properly detected. Which is kind of strange as it is correctly
detected when I do a standard installation.
So it might be harder to draw a window ...
Any shortcut for that ?
(yeah, by total newbie on Plan 9, I meant really total newbie :-) )

I'll have a look anyway.

thanks

--
Laurent Malvert [laurent.malvert@gmail.com]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-28  5:35       ` Laurent Malvert
@ 2006-03-28  6:27         ` Laurent Malvert
  2006-03-28  7:03           ` Skip Tavakkolian
  0 siblings, 1 reply; 12+ messages in thread
From: Laurent Malvert @ 2006-03-28  6:27 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 3/28/06, Laurent Malvert <laurent.malvert@gmail.com> wrote:
> On 3/27/06, Russ Cox <rsc@swtch.com> wrote:
> > > Is there some chance there is a pbs vs. pbslba issue?
> >
> > Possibly, but it's unlikely.  The install script
> > switches to pbslba if 9fat ends more than 1G
> > into the disk, and his is 40G into the disk.
> >
> > That's one thing to try though: boot from the CD,
> > draw a window, and run
> >         disk/format -b /386/pbslba /dev/sdC1/9fat
> >
> > I just changed pbs and pbslba to print PBS1... and PBS2...
> > so that we won't have to wonder about this in the future.
> >
>
> thanks for the tip, I'll try that and keep you posted.
> but...
> little problem there...
> I just remembered, I tried to use the LiveCD mode, but my mouse wasn't
> properly detected. Which is kind of strange as it is correctly
> detected when I do a standard installation.
> So it might be harder to draw a window ...
> Any shortcut for that ?
> (yeah, by total newbie on Plan 9, I meant really total newbie :-) )
>
> I'll have a look anyway.
>
> thanks

nopte, doesn't work :-(

still the same IO error.

(disk/format returned a message saying:
0 bytes used
or something alike)

didn't solve the mouse detection problem with the LiveCD either (nice
that the active window was the term with the description of Rio).

--
Laurent Malvert [laurent.malvert@gmail.com]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-28  6:27         ` Laurent Malvert
@ 2006-03-28  7:03           ` Skip Tavakkolian
  2006-03-28  7:48             ` Laurent Malvert
  0 siblings, 1 reply; 12+ messages in thread
From: Skip Tavakkolian @ 2006-03-28  7:03 UTC (permalink / raw)
  To: 9fans

> didn't solve the mouse detection problem with the LiveCD either (nice
> that the active window was the term with the description of Rio).

if you have a usb mouse, you might need to start usbd & usbmouse by
hand.  the default termrc doesn't include them.  after a recent
install i had to refresh the sources and rebuild /sys/src/cmd/usb for
it to pickup M$ optical mouse.

usb/usbd
usb/usbmouse -s # for scroll wheel



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-28  7:03           ` Skip Tavakkolian
@ 2006-03-28  7:48             ` Laurent Malvert
  0 siblings, 0 replies; 12+ messages in thread
From: Laurent Malvert @ 2006-03-28  7:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 3/28/06, Skip Tavakkolian <9nut@9netics.com> wrote:
> > didn't solve the mouse detection problem with the LiveCD either (nice
> > that the active window was the term with the description of Rio).
>
> if you have a usb mouse, you might need to start usbd & usbmouse by
> hand.  the default termrc doesn't include them.  after a recent
> install i had to refresh the sources and rebuild /sys/src/cmd/usb for
> it to pickup M$ optical mouse.
>
> usb/usbd
> usb/usbmouse -s # for scroll wheel

can't try it now, but I will as soon as I can.

thanks for the tip.

--
Laurent Malvert [laurent.malvert@gmail.com]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-28  5:30   ` Laurent Malvert
@ 2006-03-28 16:19     ` Russ Cox
  2006-03-28 16:46       ` matt
  2006-03-28 19:56       ` David Leimbach
  0 siblings, 2 replies; 12+ messages in thread
From: Russ Cox @ 2006-03-28 16:19 UTC (permalink / raw)
  To: 9fans

> I think I get what you mean, but why would it swap the drive letters ?
> I mean if grub already found the right partition and started it, why
> would it then mess up while calling 9load ?

PCs are only meant to boot from the first hard drive.
Grub does some kind of magic that I don't fully understand
to convince the BIOS to pretend that the second hard drive
is the first and vice versa.  If that doesn't get through to
pbs/pbslba or gets through the wrong way, then pbs/pbslba
could easily end up looking at the wrong disk for the 9fat
partition.

Russ



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-28 16:19     ` Russ Cox
@ 2006-03-28 16:46       ` matt
  2006-03-28 19:56       ` David Leimbach
  1 sibling, 0 replies; 12+ messages in thread
From: matt @ 2006-03-28 16:46 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

http://btmgr.sourceforge.net

will also do the letter swapping dance

I *think* you can use it in combination with grub (not done so myself)

I use it for multi-booting freebsd / windowsXp and plan9 on whatever
drives one likes


not that anyone would boot plan9 & windowsxp on the same machine, eh
uriel ?


Russ Cox wrote:
>> I think I get what you mean, but why would it swap the drive letters ?
>> I mean if grub already found the right partition and started it, why
>> would it then mess up while calling 9load ?
>
> PCs are only meant to boot from the first hard drive.
> Grub does some kind of magic that I don't fully understand
> to convince the BIOS to pretend that the second hard drive
> is the first and vice versa.  If that doesn't get through to
> pbs/pbslba or gets through the wrong way, then pbs/pbslba
> could easily end up looking at the wrong disk for the 9fat
> partition.
>
> Russ
>
>


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [9fans] Grub Boot Problem
  2006-03-28 16:19     ` Russ Cox
  2006-03-28 16:46       ` matt
@ 2006-03-28 19:56       ` David Leimbach
  1 sibling, 0 replies; 12+ messages in thread
From: David Leimbach @ 2006-03-28 19:56 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 3/28/06, Russ Cox <rsc@swtch.com> wrote:
> > I think I get what you mean, but why would it swap the drive letters ?
> > I mean if grub already found the right partition and started it, why
> > would it then mess up while calling 9load ?
>
> PCs are only meant to boot from the first hard drive.
> Grub does some kind of magic that I don't fully understand
> to convince the BIOS to pretend that the second hard drive
> is the first and vice versa.  If that doesn't get through to
> pbs/pbslba or gets through the wrong way, then pbs/pbslba
> could easily end up looking at the wrong disk for the 9fat
> partition.
>
> Russ
>
>
It's really not that magical.  The BIOS itself has to map interrupt
0x13 (which is originally the floppy controller from way back before
hard disks were available in PCs) to 0x40.  Then 0x13 has to deal with
things that are really floppy requests and subsequently call 0x40. 
(bit 7 being high in the DL register meant it was a hard disk...
anything else was a floppy drive)

Replacing interrupt handlers in DOS was very commonplace.  It should
be possible to remap which disk is being booted from (CMOS parameters
do this, and so can GRUB, just like you could in DOS.)

0x80 is typically C:
0x81 is typically D:

Machines (and BIOSes) after 1995 typically could support 4 drives.

Hmmm, that semester of 16bit PC assembly in college just came in handy
I guess.... (I admit, I had to look at my notes :-)

It used to be fun to rewrite the keyboard interrupt (0x9 IIRC) such
that it would dork around with the vga panning registers everytime
someone hit spacebar.  DOS was so hackable.

Dave


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-03-28 19:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-27  9:23 [9fans] Grub Boot Problem Laurent Malvert
2006-03-27 12:41 ` Russ Cox
2006-03-27 13:04   ` David.Eckhardt, Dave Eckhardt
2006-03-27 13:19     ` Russ Cox
2006-03-28  5:35       ` Laurent Malvert
2006-03-28  6:27         ` Laurent Malvert
2006-03-28  7:03           ` Skip Tavakkolian
2006-03-28  7:48             ` Laurent Malvert
2006-03-28  5:30   ` Laurent Malvert
2006-03-28 16:19     ` Russ Cox
2006-03-28 16:46       ` matt
2006-03-28 19:56       ` David Leimbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).