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 18th February 2016
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Question can't create a bootable Nbsd USB key, from linux, unetbootin or dd alike

Hello.
Though I think I may have been able to do it in the past, all my attempts fail now : I try to create a bootable usb key, which would contain the installer, AND on which I would install the system itself.
I try with unetbootin(I am in debian 9 now), while booting the unetbootin menu appears, but can't find any image to boot on.
And with 'dd if=image.iso of=/dev/sdc'(see, I took the whole disk, not the partition sdc1, maybe I was wrong ?), it isn't recognized at all by neither of my two computer.
We can find a way to create it, or to run the installer on a virtual box(never done that, or for a Windows more than 1 year ago), and install it on the key from the virtual box. I would add, that my computer CAN boot from a usb key, and I put all way to boot from it(fdd, hdd, cd, etc) one after the other before the hard disk, in the boot menu, to be sure I don't miss something.
Reply With Quote
  #2   (View Single Post)  
Old 18th February 2016
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

Create a NetBSD install CD, insert your USB key, boot the NetBSD installerfrom the CD and choose the USB key as the hard drive to install on. Simple isn't it
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #3   (View Single Post)  
Old 18th February 2016
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

I just downloaded NetBSD-7.0-amd64-install.img.gz on my OpenBSD box. After gunziping it became:
Code:
$  ls -l NetBSD-7.0-amd64-install.img
-rw-r--r--  1 adriaan  wheel  576716800 Feb 18 21:57 NetBSD-7.0-amd64-install.img
Because I suspected that this was an bootable USB image I ran file(1) on it:
Code:
$ file NetBSD-7.0-amd64-install.img
NetBSD-7.0-amd64-install.img: x86 boot sector; partition 1: ID=0xa9, active, starthead 32, startsector 2048, 1124352 sector
So this confirmed it has a boot sector ......

Next step was to write this image to an USB stick/key (remember still using OpenBSD ):

Checking how the USB stick was detected
Code:
$ dmesg | tail
umass0 at uhub0 port 5 configuration 1 interface 0 "Innostor PenDrive" rev 2.10/0.01 addr 2
umass0: using SCSI over Bulk-Only
scsibus3 at umass0: 2 targets, initiator 0
sd0 at scsibus3 targ 1 lun 0: <Innostor, Innostor, 1.00> SCSI4 0/direct removable serial.1f750917000000000205
sd0: 15073MB, 512 bytes/sector, 30870077 sectors
Being detected as an OpenBSD sd0 device I wrote the NetBSD image:

Code:
$ sudo dd if=NetBSD-7.0-amd64-install.img of=/dev/rsd0c bs=1m
I can confirm this is an NetBSD install image, it booted successfully into the NetBSD installer......
Conclusion: NetBSD provides an install image, that you write to an USB key/stick
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #4   (View Single Post)  
Old 18th February 2016
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

This is the first part of the NetBSD install booted from the USB stick, that I captured with a serial console:
Code:
Welcome to the NetBSD/amd64 7.0 installation image
===============================================================================

ACPI (Advanced Configuration and Power Interface) should work on all modern
and legacy hardware.  However if you do encounter a problem while booting,
try disabling it and report a bug at http://www.NetBSD.org/.

     1. Install NetBSD
     2. Install NetBSD (no ACPI)
     3. Install NetBSD (no ACPI, no SMP)
     4. Drop to boot prompt

Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 06seconds..
14186104+654328+594952\[1024968+717517]=0x1163068
Unfortunately documentation of NetBSD serial console configuration is hard to find.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #5   (View Single Post)  
Old 23rd February 2016
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Default

Thanks, I did what you said and successed going up to the last menu.
Then, whatever I chose(didn't try the third option), the last lines I see before getting to what seems to be a boot prompt, is :
Quote:
mount_ffs: /dev/sd0a on /:specified device does not match mount device
cp: /etc/gettytab: Read-only file system
init: can't add utmpx record for 'system boot': Bad file descriptor
init: can't add utmpx record for 'run level': Bad file descriptor
init: can't add utmpx record for 'console': Bad file descriptor
I didn't see other things looking like fails. After that, I got a ' login :' thing, in which I can only enter 'root', then I am not asked for a password, then the keyboard layout in english(which doesn't please me, I am French), and nothing seems to work, no "man", no "help".
Reply With Quote
  #6   (View Single Post)  
Old 23rd February 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Is the last menu item you mention dealing with disk formatting/labeling? You may be trying to format the usb drive(sd0) instead of an SATA hard drive(sd1).

You can sort this out by seeing how the drives are enumerated in dmesg.
# dmesg | grep sd
Reply With Quote
  #7   (View Single Post)  
Old 24th February 2016
spermwhale_warrior spermwhale_warrior is offline
Fdisk Soldier
 
Join Date: May 2013
Posts: 59
Default

I tried while waiting for the computer to boot properly on the installation key and show me the menu above to plug the target flash key, and it worked. I did encounter some fails, but when I didn't try to put FFV2 instead of FFV1 for the first partition, and when I let some megabytes between it and the swap partition, it went well without error notifications. I chose my password and everything, however at the end it couldn't run the umount command for some reason. So I was forced to shut it down by force.
And, it does not boot. I can't boot from the flash key ... hell knows why .
How can I, from linux : try to boot into it in a serial console, whatever it be ?
I assure that prior to to that umount issue, there were error notifications.
Reply With Quote
  #8   (View Single Post)  
Old 24th February 2016
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

If your hard drive previously had a GPT boot loader this can happen. It has something to do with the GPT boot loader using the first 2 sectors. NetBSD boot loader uses 1 sector and only writes to the first sector. I've had consistent success wiping out the GPT data using gdisk as described here. gdisk is available with gparted, PartedMagic, System Rescue CD and as a separate Debian package.
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
ntopng-alike for OpenBSD bsdnut82 OpenBSD Packages and Ports 2 16th August 2015 10:25 PM
How to create a portable, bootable OpenBSD -NOT INSTALLER-? Crypto333 OpenBSD Installation and Upgrading 35 29th December 2014 07:44 AM
Create OpenBSD guest for Linux KVM (Kernel-based Virtual Machine) with 'virt-install' J65nko Guides 4 11th December 2014 04:30 AM
how to prepare a bootable usb image spermwhale_warrior NetBSD General 1 25th October 2014 12:17 PM
How to Create a Bootable CD from an .iso file rtwingfield FreeBSD Installation and Upgrading 4 22nd June 2010 10:08 AM


All times are GMT. The time now is 11:10 PM.


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