From owner-freebsd-questions@FreeBSD.ORG Thu Feb 25 23:34:15 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9983A1065673 for ; Thu, 25 Feb 2010 23:34:15 +0000 (UTC) (envelope-from aiza21@comclark.com) Received: from avmxsmtp2.comclark.com (avmxsmtp2.comclark.com [202.69.191.116]) by mx1.freebsd.org (Postfix) with ESMTP id F19C98FC1F for ; Thu, 25 Feb 2010 23:34:14 +0000 (UTC) Received: (qmail 9127 invoked by uid 89); 25 Feb 2010 22:27:48 -0000 Received: by simscan 1.3.1 ppid: 9121, pid: 9122, t: 0.0872s scanners: attach: 1.3.1 clamav: 0.91.2/m: Received: from unknown (HELO ?10.0.10.3?) (202.69.173.103) by avmxsmtp2.comclark.com with SMTP; 25 Feb 2010 22:27:47 -0000 Message-ID: <4B8708EF.1010204@comclark.com> Date: Fri, 26 Feb 2010 07:34:07 +0800 From: Aiza User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: freebsd-questions References: <201002250233.o1P2XWGD011984@mail.r-bonomi.com> In-Reply-To: <201002250233.o1P2XWGD011984@mail.r-bonomi.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: Re: boot loaders and USB devices X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Feb 2010 23:34:15 -0000 >> Date: Thu, 25 Feb 2010 07:54:00 +0800 >> From: Aiza >> Subject: boot loaders and USB devices >> >> My PC does not have the BIOS option to boot from USB. >> >> I use an USB cabled external hard drive for taking backups. It has >> FreeBSD installed on it which I want to boot from so the motherboard >> cabled hard drive file systems are un-mounted during the dump. This USB >> drive will only be attached to do backups. >> >> I also have a USB stick containing a Freebsd install used to clone >> itself to the motherboard cabled hard drive. >> >> Since the BIOS will only boot from the motherboard cabled hard drive can >> I install a boot loader to gain boot access to my seldom connected USB >> devices? >> >> I reviewed the grub port but with no joy. >> >> What do you recommend? > > > Robert Bonomi wrote: > I think the standard FreeBSD loader should do this -- I haven't personally > tested, however. You should get a menu from the boot loader asking which > partition you want to boot from. with F5 (I think it is) being 'second disk". > hit F5, and you get the 'which boot partition' menu again. Pick F1 for the > first partition on the USB drive, and you should be in business. (obviously > the '2nd disk' choice is going to show up _only_ if the boot loader detects > the drive at power-up. I don't think it relies on the BIOS for this check, > but has basic USB support built-in. > > Several _other_ possible approaches: > > if you can boot from CD, you could boot the 'live' cd, and then specify > that the running filesystems are on the USB device > > Might be able to do the same from a carefully constructed floppy image. > > A -really- 'dirty tricks' alternative is to have an alternate /etc/fstab > on the 'motherboard-cabled' HDD. One that specifies that '/' and everything > else are on the usb-cabled drive. > > swap the fstab files, and boot 'as normal'. It will come up with everything > running of the USB drive.` > > Do the backup, swap the fstab file back to the 'production' one, and reboot. > voila! back to the normal drive. > > One more posswibility -- build a custom kernel with the 'root' device 'hard- > wired' in as the USB drive. Interrupt the boot sequence, and specify this > alternate kernel by name. > > > I had though the boot0cfg was not USB aware so never tested it. But now I have tested and I was right. With the bootable USB stick flash drive plugged in I powered on the PC. I can see the PC bios post messages roll by and I see that the bios have added msg saying USB flash memory device and the pri-master ata device as available. The FreeBSD boot0cfg manager comes up with only f1 and f6 options. Pressing f5 has no effect. To me this means that the boot0cfg manager is not USB aware. Have to remember that boot0cfg was written way before there was such a thing as USB anythings.