Re: portable USB disk installation
Unfortunately I can confirm the ROOT. alias in fstab does not work in 8.1 and there is no mention of it in the getfsspecname man page. I will try to move to -current. Thanks to everyone for quick replies. Great community.
Re: portable USB disk installation
On Sun, Oct 06, 2019 at 03:28:39PM +0100, David Brownlee wrote: |On Sun, 6 Oct 2019 at 14:03, Rhialto wrote: |> On Sun 06 Oct 2019 at 13:46:03 +0200, orr721 wrote: |> > Is there some way how to make the installation disk number |> > agnostic? |> [ snip ] |> |> So instead of '/dev/sd0a' you would use 'ROOT.a', etc. huh ... when did this become available? that's pretty neat continuing on with this feature, how does this interact with something like /etc/dumpdates? does the root device name remain the same? dump will rely on the device name to keep track of which level of dump is required next ... if it changes, you might still need the RAIDFrame trick below |If you need to do this on older NetBSD systems you can setup a single |element autoconfiguring raidframe device (eg raid6) and have root on |raid6a - I've done that one NetBSD7 & 8. (If you are running a new |enough release to have ROOT though, don't bother faffing with raidframe |for this :-p)| yes, I was about to chime in with this response as I do exactly this on some of my older instances, but you beat me to it ... :) also - I've recently discovered a bunch of disks with old installs of NetBSD on them from some of my hosts where either the hardware died or the disk developed dud sectors[1] ... modern Linux doesn't understand RAIDFrame or ffs, but you can easily convince VirtualBox to create a .vmdk disk which references the appropriate disk device[2], create an appropriate VM shell and then boot directly off the USB disk - I mention this because it might be useful for someone in a pinch if they have a box which has fallen over and no other *BSD hosts handy to plug it into[3] Regards, Malcolm [1] in the case of the disk with bad sectors, the host couldn't complete an fsck so I did need to use ddrescue to do a block-level copy of what was recoverable first, but otherwise it was the same process [2] not a copy, think more a symlink to it - for example: vboxmanage internalcommands createrawvmdk \ -rawdisk /dev/sdd1 -filename foo.vmdk see https://www.virtualbox.org/manual/ch09.html#rawdisk [3] be aware of RAIDFrame auto-numbering if you do this to a NetBSD host that uses it, because the host sees it first before VirtualBox gets a chance to ... -- Malcolm Herbert m...@mjch.net
Issues with booting from named wedges, raidframe & NetBSD-9 (Regression from NetBSD-8)
I have a 'root on RAID1' setup NetBSD-8 box upgraded to NetBSD-9 which no longer auto boots. There are six disks in the machine, but the relevant dmesg entries are: wd0: 5589 GB, 11628021 cyl, 16 head, 63 sec, 512 bytes/sect x 11721045168 sectors dk0 at wd0: "raid0part0", 134217728 blocks at 2048, type: raidframe wd2: 1863 GB, 3876021 cyl, 16 head, 63 sec, 512 bytes/sect x 3907029168 sectors raid0: Components: /dev/wd2a /dev/dk0 So, this is a RAID1 with one partition on a gpt partition and another on a disklabel (for historical incrementally upgrading reasons). In both cases the partition is 1M from the start of the disk. # disklabel wd2| ag ' a:' a: 134217728 2048 RAID # (Cyl. 2*- 133154*) # gpt show -i 1 wd0 Details for index 1: Start: 2048 (1M) Size: 134217728 (64G) Type: raid (49f48daa-b10e-11dc-b99b-0019d1879648) GUID: 1680cacb-62e6-4f81-a31a-7211bb8e0a08 Label: raid0part0 Attributes: biosboot Boots a NetBSD-9 kernel fine from NetBSD-8 boot blocks. Upgrading the bootblocks to NetBSD-9 gives. (Mk.1 eyeball cut&paste) NetBSD/x86 ffsv2 Primary Bootstrap NAME=raid0part0 not found >> NetBSD/x86 BIOS Boot, Revision 5.1.1 (Fri Oct 4 08:09:49 UTC 2019) (from >> NetBSD 9.0_BETA) >> Memory: 635/3406336 k Press return to boot now, any other key for boot menu booting NAME=raid0part0:netbsd - starting in 0 seconds. NAME=raid0part0 not found open netbsd: Device not configured boot: NAME=raid0part0:netbsd: Input/output error booting NAME=raid0part0:netbsd.gz (howto 0x2) NAME=raid0part0 not found open netbsd.gz: Device not configured boot: NAME=raid0part0:netbsd.gz: Input/output error If I then enter: > boot hd0: [booting occurs] I'm not sure if this is related to the mix of wedge and disklabel partitions in the raidframe, or something else. A workaround in this case might be to fallback to traditional hdX: booting if the bootblocks are unable to locate the named wedge - the "NAME=raid0part0 not found" error David
Re: portable USB disk installation
On Sun, 6 Oct 2019 at 14:03, Rhialto wrote: > > On Sun 06 Oct 2019 at 13:46:03 +0200, orr721 wrote: > > Is there some way how to make the installation disk number > > agnostic? > > Indeed there is! (But it is relativly new and not well advertised; you > can find some documentation for it with `man getfsspecname`). > > In your /etc/fstab, you can use "ROOT." instead of the name of your > disk, and then follow it with the partition letter. "ROOT." stands for > the disk you booted from (or more precise, the disk where your / is). > > So instead of '/dev/sd0a' you would use 'ROOT.a', etc. If you need to do this on older NetBSD systems you can setup a single element autoconfiguring raidframe device (eg raid6) and have root on raid6a - I've done that one NetBSD7 & 8. (If you are running a new enough release to have ROOT though, don't bother faffing with raidframe for this :-p) David
Re: portable USB disk installation
On Sun 06 Oct 2019 at 13:46:03 +0200, orr721 wrote: > Is there some way how to make the installation disk number > agnostic? Indeed there is! (But it is relativly new and not well advertised; you can find some documentation for it with `man getfsspecname`). In your /etc/fstab, you can use "ROOT." instead of the name of your disk, and then follow it with the partition letter. "ROOT." stands for the disk you booted from (or more precise, the disk where your / is). So instead of '/dev/sd0a' you would use 'ROOT.a', etc. > orr721 -Olaf. -- Olaf 'Rhialto' Seibert -- rhialto at falu dot nl ___ Anyone who is capable of getting themselves made President should on \X/ no account be allowed to do the job. --Douglas Adams, "THGTTG" signature.asc Description: PGP signature
portable USB disk installation
hello, I have a USB disk with an installed NetBSD 8.1 system. It works perfectly on my laptop. However I would like to use it also on my other computers, namely on an old hp desktop. The problem is the disk is recognized as a /dev/rsd0 on the laptop but as /dev/rsd4 on the hp. The first part of the boot runs correctly but then the system complains it can't find the disk (medium not present).. Please see the screenshot: https://i.postimg.cc/28VFHz0D/IMG-2527.jpg Unfortunately I am not able to use sd0 on the hp. I have tried all the usb ports on the computer, all of them report as sd4. I have tried to search the documentation, wiki, the lists, but I have not found a solution. Is there some way how to make the installation disk number agnostic? Or is there some boot parameter I have to change? I am sorry for my noob questions I am not too experienced with the boot process. On the other hand I have been running NetBSD on old low-power computers with great success for a while now.. Thank you very much.. orr721