NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Can NetBSD on USB stick force root to be identified as sd0a?




On Jun 12, 2014, at 3:57 AM, Thomas Mueller wrote:

Is there any way to force a USB installation to identify the root as sd0a, when the disk number would normally be variable?

I could put in kernel config

config netbsd root on sd0a type ffs

but would NetBSD still decide for itself and fail to boot if it decides some other device is sd0?

Or would NetBSD actually recognize boot device as sd0?

Other possibility is to go to BIOS/UEFI and set boot priority with the NetBSD USB installation first. I haven't tested that yet.

This question is mainly for NetBSD 6.x as opposed to -current, where I could use NAME= with GPT partitioning.

I am practically abandoning NetBSD 5.x, not updating any more, doing very little on 6.x , but have a 6.x USB-stick installation that I might want to update, both i386 and amd64.


Tom



On Jun 12, 2014, at 3:57 AM, Thomas Mueller wrote:

Is there any way to force a USB installation to identify the root as sd0a, when the disk number would normally be variable?

I could put in kernel config

config netbsd root on sd0a type ffs

but would NetBSD still decide for itself and fail to boot if it decides some other device is sd0?

Or would NetBSD actually recognize boot device as sd0?

I had set up as thumb drive as a rescue disk, I had been just doing boot -a, but just tried something I had considered but put off. In my case I set up as artificially high sd9, since I already have a zip drive as sd0, and scsi
controller.
The idea is specify every thing that's a sd I have, and set the thumb drive
to a high number, in case something fails etc.
------
# Kernel root file system and dump configuration.
config          netbsd  root on sd9a type ffs

# ATAPI devices
# flags have the same meaning as for IDE drives.
cd*     at atapibus? drive ? flags 0x0000       # ATAPI CD-ROM drives
sd*     at atapibus? drive ? flags 0x0000       # ATAPI disk drives
#st*    at atapibus? drive ? flags 0x0000       # ATAPI tape drives
uk*     at atapibus? drive ? flags 0x0000       # ATAPI unknown

sd0 at atapibus? drive 0

scsibus0 at trm0
sd1     at scsibus0 target 5 lun 0
sd2     at scsibus0 target 6 lun 0

# SCSI bus support
scsibus* at scsi?

# USB Mass Storage
umass*  at uhub? port ? configuration ? interface ?
wd*     at umass?

sd9     at scsibus1 target 0 lun 0
----
Basically, just I just plugged in the thumb drive, typed dmesg
and put the 'at scsibus1 target 0 lun 0' at what seemed like a good place. I don't know how to lock scsibus1 to umass0, but seemed like I didn't need to.





Home | Main Index | Thread Index | Old Index