DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD Installation and Upgrading

NetBSD Installation and Upgrading Have trouble getting NetBSD on your toaster?

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 25th October 2015
gpatrick gpatrick is offline
Package Pilot
 
Join Date: Nov 2009
Posts: 192
Default 7.0 install to external disk

Because I try multiple operating systems, I have 4 external USB hard drives for installation. When I boot from the NetBSD installation usb image it is found as sd0 and my external hard drive is seen as sd1. The install goes smoothly and everything is fine until I reboot.

Upon reboot since the usb install disk is gone, which was sd0, my sd1 external hard drive now becomes sd0 instead and boot fails. This never happened on NetBSD 5.x or 6.x and is not a problem with FreeBSD or OpenBSD.

Any ideas?
Reply With Quote
  #2   (View Single Post)  
Old 26th October 2015
pygope pygope is offline
Port Guard
 
Join Date: Apr 2015
Posts: 32
Default changing default hard drive

Check this:
HTML Code:
https://www.netbsd.org/docs/guide/en/chap-boot.html
In your case, it seems that in the initial screen, after selecting option 4, type
Quote:
sd0a:netbsd
Once you have managed to boot NetBSD, don't forget to check /etc/fstab and modify it if necessary.
Reply With Quote
  #3   (View Single Post)  
Old 26th October 2015
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 726
Default

@gpatrick, can you clarify a bit the following:

1. How are you trying to boot?
(a) set Active flag in MBR and use DOS boot code?
(b) did you install the NetBSD boot selector (aka boot manager)?
(c) third party boot loader (LILO, grub, ...)?

2. How far does the boot process get exactly, and what happens?

3. If you leave the install USB stick in (as sd0), and also the USB drive (as sd1), can you boot properly from sd1 using the BIOS boot selector, for example?
Reply With Quote
  #4   (View Single Post)  
Old 26th October 2015
gpatrick gpatrick is offline
Package Pilot
 
Join Date: Nov 2009
Posts: 192
Default

Q1: b

Q2: The only part of the installation that isn't perfect is the "/sbin/umount /targetroot/" which leaves me to power it off and power on. Installing to the internal disk it unmounts fine. The power off leaves me with rc_configured=NO and in single user, and the chicken/egg problem because it sees sd0a mounted and sd1a is in fstab.

Trying to mount tells me "mount_ffs: /dev/sd1a on /: specified device does not match mounted device

Q3: With the usb stick in as sd0 and selected from the BIOS boot selector gives me:
> boot sd1a:netbsd
open sd1a:netbsd: Device not configured
boot: sd1a:netbsd: Device not configured
>
Reply With Quote
  #5   (View Single Post)  
Old 26th October 2015
gpatrick gpatrick is offline
Package Pilot
 
Join Date: Nov 2009
Posts: 192
Default

Just now ran:
# mount -u /dev/sd0a /
Then edited /etc/fstab and /etc/rc.conf and thought that was it, but received:
/dev/rsd0a: UNEXPECTED INCONSISTENCY and ran fsck manually. Looks to be fixing every file/directory on the system.
Reply With Quote
  #6   (View Single Post)  
Old 27th October 2015
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 726
Default

Another thought: With both USB install stick and external drive plugged in, can you boot the install stick, get a shell, mount the external drive root partition on /mnt, edit /mnt/etc/fstab to point to sd0 instead of sd1, clean up and then boot the external drive by itself?
Reply With Quote
  #7   (View Single Post)  
Old 27th October 2015
gpatrick gpatrick is offline
Package Pilot
 
Join Date: Nov 2009
Posts: 192
Default

With both the USB install stick and the USB external drive in, when I get to a shell and try to mount sd1:
# mount -u /dev/sd1a /mnt
mount_ffs: /dev/sd1a on /mnt: specified device does not match mounted device
#
Reply With Quote
  #8   (View Single Post)  
Old 27th October 2015
gpatrick gpatrick is offline
Package Pilot
 
Join Date: Nov 2009
Posts: 192
Default

Installing with a USB cdrom works fine because the USB external hard drive is seen as sd0 and the unmount of /targetroot works. But it isn't as convenient as using the USB install image. Even if unmount of /targetroot worked I'd still be faced with editing /mnt/etc/fstab, which isn't a big deal. But without unmount working at the end of the installation it is a moot point.
Reply With Quote
  #9   (View Single Post)  
Old 28th October 2015
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 726
Default

Quote:
Originally Posted by gpatrick View Post
With both the USB install stick and the USB external drive in, when I get to a shell and try to mount sd1:
# mount -u /dev/sd1a /mnt
mount_ffs: /dev/sd1a on /mnt: specified device does not match mounted device
#
I am wondering why you used the -u flag here? That is for update, which assumes something is already mounted. If you got the shell right away from the USB install stick, nothing would be mounted yet, so maybe that explains the error? I would try the mount without the -u flag and see if that helps.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Install OpenBSD in more than one disk partition? betweendayandnight OpenBSD Installation and Upgrading 6 17th July 2015 05:51 PM
FreeBSD 10.1 , install ZFS , encryption , error about pass , USB flash disk mfaridi FreeBSD General 1 24th April 2015 06:18 PM
openbsd 5.6 install can not detect my western digital USB disk mfaridi OpenBSD Installation and Upgrading 28 14th February 2015 03:26 AM
mounting NTFS external hard disk. bsdnewbie999 OpenBSD General 16 4th September 2010 01:59 PM
how to mount external hard disk ? bsdnewbie999 FreeBSD General 6 27th May 2008 02:37 AM


All times are GMT. The time now is 06:40 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick