NetBSD Problem Report #47719

From www@NetBSD.org  Fri Apr  5 20:21:47 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 2367963F2B9
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  5 Apr 2013 20:21:47 +0000 (UTC)
Message-Id: <20130405202146.47ED863F2B9@www.NetBSD.org>
Date: Fri,  5 Apr 2013 20:21:46 +0000 (UTC)
From: renekuligowski@alice-dsl.net
Reply-To: renekuligowski@alice-dsl.net
To: gnats-bugs@NetBSD.org
Subject: NetBSD install image: post-install: cannot reboot into existing GRUB / missing PPPoE
X-Send-Pr-Version: www-1.0

>Number:         47719
>Category:       install
>Synopsis:       NetBSD install image: post-install: cannot reboot into existing GRUB / missing PPPoE
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    martin
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 05 20:25:00 +0000 2013
>Last-Modified:  Sat Apr 06 22:40:08 +0000 2013
>Originator:     Renè Kuligowski
>Release:        6.0.1
>Organization:
>Environment:
not of concern; it is a general problem I encountered on three completely different machines/architectures.
>Description:
error #1: After base installation, I need PPPoE to open an internet connection in order to access any internet server.  NetBSD does NOT offer PPPoE configuration on the install image, so I'm stuck with the minimum system (and thus thinking to simply erase it and use the currently wasted space purposefully).

error #2: After installing NetBSD in parallel to debian GNU/Linux and telling sysinst not to install an MBR or a boot loader, I cannot re-boot into GRUB –– neither the copy in the MNR nor the copy in the Linux partition's header.  I needed to run a debian rescue system USB image to re-install GRUB into the MBR.


>How-To-Repeat:
see the description.
>Fix:
fix to #1: impossible without pppoe packages on the installer image.

fix to #2: use a Linux rescue image; boot into existing Linux partition; re-install GRUB to MBR; insert the following into grub.cfg:

menuitem "NetBSD 6.0.1" --class netbsd --class bsd --class os {
  set root=(hdX,msdosY)
  chainloader +1
}

…where X and Y correspond to disk and partition of NetBSD install; finally, reboot machine.

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/47719: NetBSD install image: post-install: cannot reboot into existing GRUB / missing PPPoE
Date: Sat, 6 Apr 2013 11:49:18 +0200

 Please do not file different issues in a single PR, it makes tracking very
 hard.

 For the pppoe issue: it is available on some install media, but others are
 more stripped due to size restraints. Try to exit the installer to the
 shell (or run Utils/Run /bin/sh) and try:


    ifconfig pppoe0 create
    pppoectl -v pppoe0

 to verify. If either does not work, please tell us what install media you
 used and we can check if we can add it there.

 For the grub issue: in a pre-corruption state (or after your fixup),
 please boot the install media, then exit to the shell (see above) and
 then report the output of

   fdisk wd0
   disklabel wd0

 (assuming you boot from a stock ata/sata disk).


 Thanks,

 Martin

From: =?UTF-8?B?UmVuw6kgS3VsaWdvd3NraQ==?= <renekuligowski@alice-dsl.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/47719: NetBSD install image: post-install: cannot reboot
 into existing GRUB / missing PPPoE
Date: Sat, 06 Apr 2013 15:57:19 -0100

 This is a multi-part message in MIME format.
 --------------030106080309090700090400
 Content-Type: text/plain; charset=UTF-8; format=flowed
 Content-Transfer-Encoding: 8bit

 Thanks for your quick reply.  I will keep your request in mind (not 
 putting multiple things into one PR).   My primary concern with these 
 issues is the *i386 port*, on an Atom-based notebook.  Once I get it all 
 up-and-running there, I'll use the same way on the m68k and arm machines.

 Concerning pppoe:
 I was able to create the device, thank you very much for that hint –– 
 but how do I go on from here? As a freshling to *BSD, one discovers some 
 huge differences to other unix-style systems in layout, utilities and 
 how-to-do-things, and I am not really sure how to give userid and passwd 
 for the login to the provider (is it similar to the way it is done in 
 the pppoe packages in Linux, via /etc/ppp/{chap,pap}-secrets ?)…

 Concerning the reboot/GRUB issue:
 output follows below; internal 160GB SATA disk IDE0:0. Note: There are 
 two linux systems, one in partition 0, one in partition 3; the NetBSD 
 slice is partitioned into system (55G) and swap (2G).  Partition 2 is a 
 swap/hibernate area.  GRUB is "operated" from partition 3 and resides in 
 (hd0) and, since yesterday, in (hd0,msdos4) for redundancy.  NetBSD was 
 installed in a partition that was previously used as simple 
 ext4-formatted storage volume.

 --------------------------output from "fdisk wd0":

 fdisk: removing corrupt bootsel information
 Disk: /dev/rwd0d
 NetBSD disklabel disk geometry:
 cylinders: 310101, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
 total sectors: 312581808

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

 Partitions aligned to 16065 sector boundaries, offset 63

 Partition table:
 0: Linux native (sysid 131)
      start 63, size 20964762 (10237 MB, Cyls 0-1304)
 1: NetBSD (sysid 169)
      start 20964825, size 119555730 (58377 MB, Cyls 1305-8746)
 2: Linux swap or Prime or Solaris (sysid 130)
      start 140520555, size 5429970 (2651 MB, Cyls 8747-9084)
          PBR is not bootable: All bytes are identical (0x00)
 3: Linux native (sysid 131)
      start 145950525, size 166626180 (81360 MB, Cyls 9085-19456), Active
 First active partition: 3
 Drive serial number: 2136402246 (0x7f56e946)

 -------------------------------------- output from "disklabel wd0":
 # /dev/rwd0d:
 type: unknown
 disk: TOSHIBA MK1655G
 label:
 flags:
 bytes/sector: 512
 sectors/track: 63
 tracks/cylinder: 16
 sectors/cylinder: 1008
 cylinders: 310101
 total sectors: 312581808
 rpm: 3600
 interleave: 1
 trackskew: 0
 cylinderskew: 0
 headswitch: 0        # microseconds
 track-to-track seek: 0    # microseconds
 drivedata: 0

 16 partitions:
 #        size    offset     fstype [fsize bsize cpg/sgs]
   a: 115359552  20964825     4.2BSD   2048 16384     0  # (Cyl.  20798*- 
 135242*)
   b:   4196178 136324377       swap                     # (Cyl. 135242*- 
 139405*)
   c: 119555730  20964825     unused      0     0        # (Cyl.  20798*- 
 139405*)
   d: 312581808         0     unused      0     0        # (Cyl.      0 - 
 310100)
   e:  20964762        63 Linux Ext2      0     0        # (Cyl.      
 0*-  20798*)
   g:   5429970 140520555       swap                     # (Cyl. 139405*- 
 144792*)
   h: 166626180 145950525 Linux Ext2      0     0        # (Cyl. 144792*- 
 310095*)


 Regards, rekuli

 ---

 On 06.04.2013 08:55, Martin Husemann wrote:
 > The following reply was made to PR install/47719; it has been noted by GNATS.
 >
 > From: Martin Husemann<martin@duskware.de>
 > To: gnats-bugs@NetBSD.org
 > Cc:
 > Subject: Re: install/47719: NetBSD install image: post-install: cannot reboot into existing GRUB / missing PPPoE
 > Date: Sat, 6 Apr 2013 11:49:18 +0200
 >
 >   Please do not file different issues in a single PR, it makes tracking very
 >   hard.
 >
 >   For the pppoe issue: it is available on some install media, but others are
 >   more stripped due to size restraints. Try to exit the installer to the
 >   shell (or run Utils/Run /bin/sh) and try:
 >
 >
 >      ifconfig pppoe0 create
 >      pppoectl -v pppoe0
 >
 >   to verify. If either does not work, please tell us what install media you
 >   used and we can check if we can add it there.
 >
 >   For the grub issue: in a pre-corruption state (or after your fixup),
 >   please boot the install media, then exit to the shell (see above) and
 >   then report the output of
 >
 >     fdisk wd0
 >     disklabel wd0
 >
 >   (assuming you boot from a stock ata/sata disk).
 >
 >
 >   Thanks,
 >
 >   Martin
 >
 >
 >    

 --------------030106080309090700090400
 Content-Type: text/html; charset=UTF-8
 Content-Transfer-Encoding: 8bit

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
   <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
   <title></title>
 </head>
 <body bgcolor="#ffffff" text="#000000">
 Thanks for your quick reply.  I will keep your request in mind (not
 putting multiple things into one PR).   My primary concern with these
 issues is the i386 port, on an Atom-based notebook.  Once I get
 it all up-and-running there, I'll use the same way on the m68k and arm
 machines. <br>
 <br>
 Concerning pppoe: <br>
 I was able to create the device, thank you very much for that hint ––
 but how do I go on from here? As a freshling to *BSD, one discovers
 some huge differences to other unix-style systems in layout, utilities
 and how-to-do-things, and I am not really sure how to give userid and
 passwd for the login to the provider (is it similar to the way it is
 done in the pppoe packages in Linux, via /etc/ppp/{chap,pap}-secrets ?)…<br>
 <br>
 Concerning the reboot/GRUB issue: <br>
 output follows below; internal 160GB SATA disk IDE0:0. Note: There are
 two linux systems, one in partition 0, one in partition 3; the NetBSD
 slice is partitioned into system (55G) and swap (2G).  Partition 2 is a
 swap/hibernate area.  GRUB is "operated" from partition 3 and resides
 in (hd0) and, since yesterday, in (hd0,msdos4) for redundancy.  NetBSD
 was installed in a partition that was previously used as simple
 ext4-formatted storage volume.<br>
 <br>
 --------------------------output from "fdisk wd0":<br>
 <br>
 fdisk: removing corrupt bootsel information<br>
 Disk: /dev/rwd0d<br>
 NetBSD disklabel disk geometry:<br>
 cylinders: 310101, heads: 16, sectors/track: 63 (1008 sectors/cylinder)<br>
 total sectors: 312581808<br>
 <br>
 BIOS disk geometry:<br>
 cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)<br>
 total sectors: 312581808<br>
 <br>
 Partitions aligned to 16065 sector boundaries, offset 63<br>
 <br>
 Partition table:<br>
 0: Linux native (sysid 131)<br>
     start 63, size 20964762 (10237 MB, Cyls 0-1304)<br>
 1: NetBSD (sysid 169)<br>
     start 20964825, size 119555730 (58377 MB, Cyls 1305-8746)<br>
 2: Linux swap or Prime or Solaris (sysid 130)<br>
     start 140520555, size 5429970 (2651 MB, Cyls 8747-9084)<br>
         PBR is not bootable: All bytes are identical (0x00)<br>
 3: Linux native (sysid 131)<br>
     start 145950525, size 166626180 (81360 MB, Cyls 9085-19456), Active<br>
 First active partition: 3<br>
 Drive serial number: 2136402246 (0x7f56e946)<br>
 <br>
 -------------------------------------- output from "disklabel wd0":<br>
 # /dev/rwd0d:<br>
 type: unknown<br>
 disk: TOSHIBA MK1655G<br>
 label: <br>
 flags:<br>
 bytes/sector: 512<br>
 sectors/track: 63<br>
 tracks/cylinder: 16<br>
 sectors/cylinder: 1008<br>
 cylinders: 310101<br>
 total sectors: 312581808<br>
 rpm: 3600<br>
 interleave: 1<br>
 trackskew: 0<br>
 cylinderskew: 0<br>
 headswitch: 0        # microseconds<br>
 track-to-track seek: 0    # microseconds<br>
 drivedata: 0 <br>
 <br>
 16 partitions:<br>
 #        size    offset     fstype [fsize bsize cpg/sgs]<br>
  a: 115359552  20964825     4.2BSD   2048 16384     0  # (Cyl.  20798*-
 135242*)<br>
  b:   4196178 136324377       swap                     # (Cyl. 135242*-
 139405*)<br>
  c: 119555730  20964825     unused      0     0        # (Cyl.  20798*-
 139405*)<br>
  d: 312581808         0     unused      0     0        # (Cyl.      0 -
 310100)<br>
  e:  20964762        63 Linux Ext2      0     0        # (Cyl.     
 0*-  20798*)<br>
  g:   5429970 140520555       swap                     # (Cyl. 139405*-
 144792*)<br>
  h: 166626180 145950525 Linux Ext2      0     0        # (Cyl. 144792*-
 310095*)<br>
 <br>
 <br>
 Regards, rekuli<br>
 <br>
 --- <br>
 <br>
 On 06.04.2013 08:55, Martin Husemann wrote:
 <blockquote cite="mid:20130406095506.D773163F31B@www.NetBSD.org"
  type="cite">
   <pre wrap="">The following reply was made to PR install/47719; it has been noted by GNATS.

 From: Martin Husemann <a class="moz-txt-link-rfc2396E" href="mailto:martin@duskware.de">&lt;martin@duskware.de&gt;</a>
 To: <a class="moz-txt-link-abbreviated" href="mailto:gnats-bugs@NetBSD.org">gnats-bugs@NetBSD.org</a>
 Cc: 
 Subject: Re: install/47719: NetBSD install image: post-install: cannot reboot into existing GRUB / missing PPPoE
 Date: Sat, 6 Apr 2013 11:49:18 +0200

  Please do not file different issues in a single PR, it makes tracking very
  hard.

  For the pppoe issue: it is available on some install media, but others are
  more stripped due to size restraints. Try to exit the installer to the
  shell (or run Utils/Run /bin/sh) and try:


     ifconfig pppoe0 create
     pppoectl -v pppoe0

  to verify. If either does not work, please tell us what install media you
  used and we can check if we can add it there.

  For the grub issue: in a pre-corruption state (or after your fixup),
  please boot the install media, then exit to the shell (see above) and
  then report the output of

    fdisk wd0
    disklabel wd0

  (assuming you boot from a stock ata/sata disk).


  Thanks,

  Martin


   </pre>
 </blockquote>
 </body>
 </html>

 --------------030106080309090700090400--

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/47719: NetBSD install image: post-install: cannot reboot into existing GRUB / missing PPPoE
Date: Sat, 6 Apr 2013 19:17:34 +0200

 On Sat, Apr 06, 2013 at 04:00:14PM +0000, René Kuligowski wrote:
 >  Concerning pppoe:
 >  I was able to create the device, thank you very much for that hint
 >  but how do I go on from here?

 Here is some documentation:

 	http://www.netbsd.org/docs/network/pppoe/

 >  --------------------------output from "fdisk wd0":
 >  
 >  fdisk: removing corrupt bootsel information

 I wonder if this is part of the problem.

 I can't spot anything wrong with the rest.

 Martin

From: =?UTF-8?B?UmVuw6kgS3VsaWdvd3NraQ==?= <renekuligowski@alice-dsl.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/47719: NetBSD install image: post-install: cannot reboot
 into existing GRUB / missing PPPoE
Date: Sat, 06 Apr 2013 19:14:45 -0100

 PPPoE:
 Thanks again. I had already searched the official site for info 
 regarding pppoe, but I did not find that section.  I will try to get it 
 working.

 fdisk output:
 which "corrupt bootsel info" does it refer to when no bootsel was 
 installed –– or does this mean fdisk *expects* to find bootsel code and 
 prints this error when it is *not* there (as I did not install bootsel)?
 Everything else worked just fine, except that the MBR was shredded 
 somehow and forced me to to a manual fix-up.  Does the installer try to 
 "correct" the MBR even when you tell it to leave it as it is?  That 
 would, indeed, explain everything.

 Regards, rekuli


Responsible-Changed-From-To: install-manager->martin
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Sat, 06 Apr 2013 19:22:35 +0000
Responsible-Changed-Why:
Looking at it...


From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/47719: NetBSD install image: post-install: cannot reboot into existing GRUB / missing PPPoE
Date: Sat, 6 Apr 2013 21:21:38 +0200

 On Sat, Apr 06, 2013 at 07:15:06PM +0000, René Kuligowski wrote:
 >  which "corrupt bootsel info" does it refer to

 A native NetBSD boot block (optionally) may have some info in there 
 for the boot selector menu and fdisk can modify it - but it should not
 touch the MBR if a non-NetBSD boot sector is there.

 Should be easy to verify and would explain your problem - I will have
 a look.

 Martin

From: =?UTF-8?B?UmVuw6kgS3VsaWdvd3NraQ==?= <renekuligowski@alice-dsl.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/47719: NetBSD install image: post-install: cannot reboot
 into existing GRUB / missing PPPoE
Date: Sat, 06 Apr 2013 22:53:31 -0100

 Sorry for almost-flooding–– just to let you know, because I tried: 
 netbsd's fdisk *always* tells me about corrupted bootsel code, but 
 doesn't do anything to the MBR since I can boot normally into each of 
 the three systems I load via GRUB.  Ergo, fdisk can't be the problem.  
 Somehow I get the feeling that this is one of those "occasional aberrant 
 system behaviour for no apparent reason" stories.
 If I find something new about this matter, I'll mail it in.

 Thanks so far, rekuli

From: =?UTF-8?B?UmVuw6kgS3VsaWdvd3NraQ==?= <renekuligowski@alice-dsl.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/47719: NetBSD install image: post-install: cannot reboot
 into existing GRUB / missing PPPoE
Date: Sat, 06 Apr 2013 22:40:37 -0100

 fdisk/bootsector: good luck ;-) Is it possible that fdisk checks if the 
 MBS is either bootsel or default MSDOS MBR, and automatically assumes 
 bootsel if non-MSDOS?  That would classify as "bug", IMHO.

 pppoe: still trying, it is a bit hairy to do manually and pppoe0 
 stubbornly refuses to comply with me… please, consider including pppoe 
 into the installer, with auto-negotiation, daemon-loading etc.

 On 06.04.2013 18:25, Martin Husemann wrote:
 >   >   which "corrupt bootsel info" does it refer to
 >
 >   A native NetBSD boot block (optionally) may have some info in there
 >   for the boot selector menu and fdisk can modify it - but it should not
 >   touch the MBR if a non-NetBSD boot sector is there.
 >
 >   Should be easy to verify and would explain your problem - I will have
 >   a look.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.