Re: Write an install image to a flash drive?
On Aug 26, 2019 8:59 AM, Jason Mitchell wrote: > > On Aug 25, 2019, at 8:26 AM, Rhialto wrote: > > >> | I _can't imagine_ how many stupid things I just did, but could > >> | someone please tell me how to get that install image onto the > >> | flash drive in a form that will boot? > >> > >> You cannot. "That" image is in ISO format, which have a booting > >> method unique in the universe. You need an image set up for booting > >> from a memory stick, which is much more similar to a regular drive > >> than a CD (ISO format). > > > > *Some* BIOSes allow booting USB sticks even if they contain ISO images. > > I'm certain I've done it a few times with Ubuntu images. But last time I > > tried it with a NetBSD ISO image, it failed. (But I'm not sure if I > > actually tried it on the same computer for instance, or if maybe the > > Ubuntu images contain something special to make this possible). > > I believe it has something to do with the SYSLINUX that makes it possible. https://en.m.wikipedia.org/wiki/SYSLINUX > > -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" > > Are you talking about an .iso image on a FAT filesystem or what programs like > Rufus (Windows) or Etcher (MacOS) do, which is taking an iso image and > writing it to a USB drive. I always assumed that there was some conversion > involved, but I could be wrong. Rufus also talks about “hybrid” iso images > which have a partition table, apparently.
Re: Write an install image to a flash drive?
On Aug 25, 2019, at 8:26 AM, Rhialto wrote: >> | I _can't imagine_ how many stupid things I just did, but could >> | someone please tell me how to get that install image onto the >> | flash drive in a form that will boot? >> >> You cannot. "That" image is in ISO format, which have a booting >> method unique in the universe. You need an image set up for booting >> from a memory stick, which is much more similar to a regular drive >> than a CD (ISO format). > > *Some* BIOSes allow booting USB sticks even if they contain ISO images. > I'm certain I've done it a few times with Ubuntu images. But last time I > tried it with a NetBSD ISO image, it failed. (But I'm not sure if I > actually tried it on the same computer for instance, or if maybe the > Ubuntu images contain something special to make this possible). > > -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" Are you talking about an .iso image on a FAT filesystem or what programs like Rufus (Windows) or Etcher (MacOS) do, which is taking an iso image and writing it to a USB drive. I always assumed that there was some conversion involved, but I could be wrong. Rufus also talks about “hybrid” iso images which have a partition table, apparently.
Re: Write an install image to a flash drive?
On Sun, Aug 25, 2019 at 04:54:25PM -0400, Bob Bernstein wrote: > I would like to have a USB stick that would boot up to a running Netbsd > system that is presenting me with a login prompt, rather than defaulting to > the sysinst interface with which the install.img presents one. The only magic in that install images is in etc/ttys: just replace that with one from you stock system (or from the etc set) and it will be a normal live image. Martin
Re: Write an install image to a flash drive?
Just install the system to the flash drive instead of the hard drive. On Aug 25, 2019 3:54 PM, Bob Bernstein wrote: > > Thanks for your reflections on USB sticks and booting therefrom! > > I know I am going to do more experiments with them. I bought two > 64 gig sticks, one of which I used to upgrade my 'current' > NetBSD machine, but the other is still in its package. Not sure > what I will do with it. > > I would like to have a USB stick that would boot up to a running > Netbsd system that is presenting me with a login prompt, rather > than defaulting to the sysinst interface with which the > install.img presents one. > > I'm certain this is child's play for the wizards around here, > and I use that term only with immense respect, because the > incredible level of expertise shown by many on this list is only > ever gained by work, work, work, and work, followed by more um > WORK! > > Thank you -- a bit wordy here this afternoon (in New England). > > -- > Poobah
Re: Write an install image to a flash drive?
On Sun, 25 Aug 2019, Edgar Pettijohn wrote: Just install the system to the flash drive instead of the hard drive. Believe it or not, that possibility passed through my addled pate more than once, and left me wondering: "H?" Thank you -- Poobah
Re: Write an install image to a flash drive?
Thanks for your reflections on USB sticks and booting therefrom! I know I am going to do more experiments with them. I bought two 64 gig sticks, one of which I used to upgrade my 'current' NetBSD machine, but the other is still in its package. Not sure what I will do with it. I would like to have a USB stick that would boot up to a running Netbsd system that is presenting me with a login prompt, rather than defaulting to the sysinst interface with which the install.img presents one. I'm certain this is child's play for the wizards around here, and I use that term only with immense respect, because the incredible level of expertise shown by many on this list is only ever gained by work, work, work, and work, followed by more um WORK! Thank you -- a bit wordy here this afternoon (in New England). -- Poobah
Re: Write an install image to a flash drive?
> | I _can't imagine_ how many stupid things I just did, but could > | someone please tell me how to get that install image onto the > | flash drive in a form that will boot? > > You cannot. "That" image is in ISO format, which have a booting > method unique in the universe. You need an image set up for booting > from a memory stick, which is much more similar to a regular drive > than a CD (ISO format). *Some* BIOSes allow booting USB sticks even if they contain ISO images. I'm certain I've done it a few times with Ubuntu images. But last time I tried it with a NetBSD ISO image, it failed. (But I'm not sure if I actually tried it on the same computer for instance, or if maybe the Ubuntu images contain something special to make this possible). -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
Re: Write an install image to a flash drive?
On Wed, Aug 21, 2019 at 06:09:28PM +0200, Martin Husemann wrote: > Indeed, that image runs with the root file system on the USB device. To my delight I learned that I can edit the image "in place," as it were, on the flash drive. Thus I put my boot.cfg on it, which nicely ushers me past the odious nouveau problem on this old emachine. I'm going to have some fun with these little "sticks." Thank you -- What can be asserted without evidence can be dismissed without evidence. Hitchens' Razor
Re: Write an install image to a flash drive?
On Wed, Aug 21, 2019 at 11:44:32AM -0400, Bob Bernstein wrote: > One interesting turn running sysinst: I tried "unmounted > fs" to access the flash drive with the install img only to learn > that it was already mounted and therefore "busy." I got what I > needed selecting "Local fs" at /mnt. Indeed, that image runs with the root file system on the USB device. It is also a full populated NetBSD base system, you can exit from sysinst (or use Utils/Run /bin/sh) to get a shell and do whatever you like manually. Martin
Re: Write an install image to a flash drive?
YO YO YO Jeremy! (aka The Hardest-Working Man in NetBSD-land! ) Long time, long time... My upgrade is successful: NetBSD nebby 9.0_BETA NetBSD 9.0_BETA (GENERIC) #0: Sun Aug 18 14:36:49 UTC 2019 mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64 On Wed, Aug 21, 2019 at 09:04:59AM -0500, r...@reedmedia.net wrote: > Did you get any error message or information before it > reverted booting from your hard disk? I had the wrong img on the stick. I had just slapped a boot.iso on it, like a big dummy. With the (always) very astute aid of the assembled faithful here, I was put right. This is the img I needed, and used to good effect: http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/images/NetBSD-9.0_BETA-amd64-install.img.gz One interesting turn running sysinst: I tried "unmounted fs" to access the flash drive with the install img only to learn that it was already mounted and therefore "busy." I got what I needed selecting "Local fs" at /mnt. Thank You -- What can be asserted without evidence can be dismissed without evidence. Hitchens' Razor
Re: Write an install image to a flash drive?
On Tue, 20 Aug 2019, Bob Bernstein wrote: > I want to use a flash drive instead of a CD to upgrade from an > old 'current' to our latest. This is being done on an ancient > emachine amd64: "ancient" In my experience some old systems just won't boot from USB flash disks well. In some cases, I have had to try over five different flash disks until I found one that worked. Did you get any error message or information before it reverted booting from your hard disk?
Re: Write an install image to a flash drive?
Bob Bernstein writes: > I want to use a flash drive instead of a CD to upgrade from an > old 'current' to our latest. This is being done on an ancient > emachine amd64: > > NetBSD nebby 8.99.35 NetBSD 8.99.35 (GENERIC) #0: Wed Mar 13 06:27:34 UTC > 2019 mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64 Also, it's good to have things like flash drives and CD around to rescue your box, but you don't need external media for an upgrade. In pkgsrc there is etcmanage (my way to do it) and sysupgrade (someone else's way, a bit more mainstream). I upgrade machines in place all the time using INSTALL-NetBSD from etcmanage. That said, I don't want to discourage you from working through the flash drive issues as that's useful for you and fixing doc bugs, if any, is useful for everyone.
Re: Write an install image to a flash drive?
jmitc...@bigjar.com (Jason Mitchell) writes: >Also, is there an easy way to remove the first 2048 sectors from the image so >the FFS part could be mounted using a vnd device? Or would this work without >making changes? The image includes an MBR and NetBSD will create a default disklabel for it. E.g.: 8 partitions: #sizeoffset fstype [fsize bsize cpg/sgs] a: 2865152 2048 4.2BSD 1024 819216 # (Cyl. 1 - 1399) c: 2865152 2048 unused 0 0# (Cyl. 1 - 1399) d: 2867200 0 unused 0 0# (Cyl. 0 - 1399) You can then use /dev/vnd0a to mount the filesystem. -- -- Michael van Elst Internet: mlel...@serpens.de "A potential Snark may lurk in every tree."
Re: Write an install image to a flash drive?
>> On Aug 20, 2019, at 9:47 PM, Bob Bernstein wrote: >> >> On Tue, Aug 20, 2019 at 09:31:00PM -0400, Bob Bernstein wrote: >> >> I'm wondering: was there any preparation of the flash drive >> that should have been done before dd'ing the install-image.img >> onto it? Formatting? Filesystem? MBR? > > The above bit of speculation was inspired by this wiki article: > > https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/ > > > -- > What can be asserted without evidence can be > dismissed without evidence. >Hitchens' Razor I just did an install of 8.1 and all I did was dd the img file to a flash drive (I also used amd64). My guess is there’s something wrong with the image or your flash drive. Do you have another flash drive to test with? Also, is there an easy way to remove the first 2048 sectors from the image so the FFS part could be mounted using a vnd device? Or would this work without making changes? vnconfig -c /dev/vnd0 install.img mount /dev/vnd0a /mnt If the above works it would verify the image is correct. I’ll test in the AM if no one answers. Jason M.
Re: Write an install image to a flash drive?
On Tue, Aug 20, 2019 at 09:31:00PM -0400, Bob Bernstein wrote: > I'm wondering: was there any preparation of the flash drive > that should have been done before dd'ing the install-image.img > onto it? Formatting? Filesystem? MBR? The above bit of speculation was inspired by this wiki article: https://wiki.netbsd.org/tutorials/how_to_install_netbsd_from_an_usb_memory_stick/ -- What can be asserted without evidence can be dismissed without evidence. Hitchens' Razor
Re: Write an install image to a flash drive?
On Tue, Aug 20, 2019 at 08:18:59PM -0400, Ron Georgia wrote: > ...you find a section labeled "Booting the install system from > USB." Section 2.2.6.1 to be exact. Once the image is > downloaded, from the command line prompt: Ach! Dawn breaks over Narrangansett Bay! > What platform are you using to create the USB install device? > Mac? Linux? NetBSD (my personal favorite)? I am doing all this on the netbsd system I want to upgrade. Thank you (and Robert too for his note) -- What can be asserted without evidence can be dismissed without evidence. Hitchens' Razor
Re: Write an install image to a flash drive?
Date:Tue, 20 Aug 2019 17:59:56 -0400 From:Bob Bernstein Message-ID: <20190820215955.GA819@nebby.localdomain> | Trying 'mount /dev/sd1' /mnt yielded "bad superblock." (Pretty | sure; I am typing these results from memory.) It is pretending to be a CD (image anyway) so you would need mount -t cd9660 -r /dev/sd1 /mnt | I _can't imagine_ how many stupid things I just did, but could | someone please tell me how to get that install image onto the | flash drive in a form that will boot? You cannot. "That" image is in ISO format, which have a booting method unique in the universe. You need an image set up for booting from a memory stick, which is much more similar to a regular drive than a CD (ISO format).Someone else will have to tell you which is the right image to use, but it isn't that one. kre
Re: Write an install image to a flash drive?
I would grab either 9BETA image or current. Get the image that ends with .img.gz. For example: http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/images/NetBSD-9.0_BETA-amd64-install.img.gz Then, according to the NetBSD guide (page 5 if you printed out all 365 pages, as I did) you find a section labeled "Booting the install system from USB." Section 2.2.6.1 to be exact. Once the image is downloaded, from the command line prompt: $ gunzip NetBSD-9.0_BETA-amd64-install.img.gz $ dd if=NetBSD-9.0_BETA-amd64-install.img of=/dev/sd0 bs=2m Of course, substitute /dev/sd0 with whatever your USB device is. I noticed that the manual uses a block size of 2m instead of one; however, I do not believe using bs=1m or bs=2m will make a difference. What platform are you using to create the USB install device? Mac? Linux? NetBSD (my personal favorite)? On 8/20/19, 7:19 PM, "Bob Bernstein" wrote: I want to use a flash drive instead of a CD to upgrade from an old 'current' to our latest. This is being done on an ancient emachine amd64: NetBSD nebby 8.99.35 NetBSD 8.99.35 (GENERIC) #0: Wed Mar 13 06:27:34 UTC 2019 mkre...@mkrepro.netbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64 I am new to flash drives. I did the following with a new Kingston 64GB right out of its FedEx mailing envelope: dd if=boot.iso of=/dev/rsd1d bs=1m The boot.iso was: http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/latest/amd64/installation/cdrom/boot.iso Rebooting the emachine, it gave me a choice to boot from the Kingston, but there was no joy in Mudville. All attempts reverted to booting normally from the hd. Trying 'mount /dev/sd1' /mnt yielded "bad superblock." (Pretty sure; I am typing these results from memory.) I _can't imagine_ how many stupid things I just did, but could someone please tell me how to get that install image onto the flash drive in a form that will boot? Thank you -- What can be asserted without evidence can be dismissed without evidence. Hitchens' Razor