From owner-freebsd-questions@freebsd.org Fri Jun 28 05:44:24 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C52D015D8D04 for ; Fri, 28 Jun 2019 05:44:23 +0000 (UTC) (envelope-from frankfenderbender@council124.org) Received: from vps349.pairvps.com (vps349.pairvps.com [216.92.231.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFF928ACED for ; Fri, 28 Jun 2019 05:44:22 +0000 (UTC) (envelope-from frankfenderbender@council124.org) Received: from [192.168.0.100] (unknown [104.220.39.23]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by vps349.pairvps.com (Postfix) with ESMTPSA id 993881A249E; Fri, 28 Jun 2019 01:44:15 -0400 (EDT) Subject: Re: query re: dual-boot on two separate HDDs Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Frank Fenderbender In-Reply-To: <20190626070556.0585d12b.freebsd@edvax.de> Date: Thu, 27 Jun 2019 22:44:14 -0700 Cc: freebsd-questions@freebsd.org Reply-To: Frank Fenderbender Content-Transfer-Encoding: quoted-printable Message-Id: References: <20190626070556.0585d12b.freebsd@edvax.de> To: Polytropon X-Mailer: Apple Mail (2.1085) X-Rspamd-Queue-Id: AFF928ACED X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of frankfenderbender@council124.org designates 216.92.231.69 as permitted sender) smtp.mailfrom=frankfenderbender@council124.org X-Spamd-Result: default: False [-0.92 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[frankfenderbender@council124.org]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+a:cegray.mail.pairserver.com]; HEADER_FORGED_MDN(2.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[council124.org]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; REPLYTO_EQ_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[mailwash31.pair.com]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.89)[-0.895,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; IP_SCORE(-0.21)[asn: 7859(-1.02), country: US(-0.06)]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:7859, ipnet:216.92.0.0/16, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jun 2019 05:44:24 -0000 Thanks for the thorough reply. Since then, with the GRUB v2.01 running on Ubuntu 16.04, the issues with = EUFI installed primary OSs allowing the DVD/CD reader to boot has raised = its hydra-head. I have been dealing with this "new" Dell BIOS that = secures 'what is' from 'what can overwrite it" to such a degree that I = may have to get the Dell [factory] installed Ubuntu reinstalled as = non-EUFI so that the legacy boot order becomes truly available, as = modified now, only "BTX halted" error messages come up when either a USB = flash drive or the DVD/CD drive are moved up to number one, above the = primary internal [secured boot] drive. There's some way of doing it but the "usual suspect" Ubuntu and Dell = forums are not "filling in the blanks" as well as a contracted Dell = support person with system takeover can do. The steps that most likely would have worked are as follows.... Do it in this order: 1. Edit your /etc/grub.d/40_custom and add uzsolt's (forum user = whose code is listed below) directives: menuentry "FreeBSD" --class freebsd --class bsd --class = os { insmod ufs2 insmod bsd set root=3D(hd0,1) kfreebsd /boot/kernel/kernel kfreebsd_loadenv /boot/device.hints set kFreeBSD.vfs.root.mountfrom=3Dufs:/dev/ada0s1a set kFreeBSD.vfs.root.mountfrom.options=3Drw set kFreeBSD.hw.psm.synaptics_support=3D1 } Add the directive at the end of the file.=20 Don't delete anything that is in there. 2. Make sure 40_custom is executable. If not then chmod u+x = 40_custom. 3. Now do this to write the changes to grub.cfg. grub2-install /dev/sda=20 os-prober=20 grub2-mkconfig -o /boot/grub/grub.cfg 4. Tada! Reboot now; you should have FreeBSD in your OS list in = GRUB menu. To have access to your UFS partition slice you should do the = following: 1. Edit your kernel configuration to add UFS filesystem and UFS = label. 2. Then make && make_modules your kernel. 3. Install the UFS filesystem software. 4. Mount your UFS Slice under your Linux: /mnt/freebsd && sudo mount -r -t ufs -o ufstype=3Dufs2 = /dev/sda1 /mnt/freebsd Finally, commit the changes sudo grub-mkconfig -o /boot/grub/grub.cfg So, after the UEFI issue is solved, I will backtrack to the above = solution to see if it "works as advertised". ;-) Hope so. A bg thought... if I could find a way to launch and install of the = non-bootable/non-live FreeBSD v12.0 disk in the disk drive, then maybe I = could bypass the boot-from-drive (refusal of live or bootable disks) = issue. Maybe you (and/or others) have seen this on 2019 Dells, as it is = on the web numerous times w/r/t FreeBSD, and other installs onto = "secured" GRUB2-denying boot-install areas. best, "ff" (chris) On 25-June-2019, at 10:05 PM, Polytropon wrote: > On Tue, 25 Jun 2019 20:48:59 -0700, Frank Fenderbender wrote: >> Often, the dual-boot instructions appear to be for a same-drive, >> different partition configuration. >=20 > That is correct, because it seems to be the typical configuration. > Of course, booting from one of two (or more) physical disks is > possible. >=20 > Depending on your hardware, check if the BIOS offers a way to > choose where to boot from at system start-up time. In many cases, > there is a key assigned to this task. I'm not sure this only > covers external media (optical disks, USB drives, network, etc.), > but this could be the easiest way to go. >=20 > I'm mentioning this because I had such a Linux / FreeBSD system > in the past. You could select which drive to boot from, and each > drive had a single-system installation on it, so it would always > boot with the other disk absent. The "funny" thing was: After you > selected one drive from the BIOS to boot from, that disk became > unit 0, whereas the other one became unit 1; it could be accessed > later on from the booted system. >=20 >=20 >=20 >> So, with many well-meaning ways to botch this, I thought maybe >> someone had performed a similar sequence of steps that: >> adds FreeBSD to a second drive >> edits the GRUB/bootloader cfg file(s) >>=20 >> I am uncertain if Grub gets called by the BIOS call to the = bootloader, >> and so, is specific to Ubuntu? >=20 > No GRUB will be called as long as the (default) requirements are > met: First disk, first partition, active, GRUB "branch", GRUB menu; > selection: continue boot from 1st disk -or- "branch" to 2nd disk's > "entry point". The FreeBSD installation on the 2nd disk would > typically contain the regular MBR boot record (no boot menu > required). >=20 > So your GRUB configuration would contain the default settings for > Ubuntu (1st choice -> 1st disk), and an additional entry for FreeBSD > (2nd choice -> 2nd disk). Technically, it doesn't matter that this > is a "real" second disk instead of just a different partition. >=20 >=20 >=20 >> I would expect it to be dealing with partition choices on one >> drive, rather than stipulating starting a boot on another drive. >=20 > Doesn't matter, just the device name changes for the "set root=3D" > option. >=20 > Maybe this will provide some inspiration: >=20 > = https://unix.stackexchange.com/questions/109272/add-freebsd-to-grub2-boot-= menu/109278 >=20 > https://forums.freebsd.org/threads/freebsd-and-linux-dual-boot.60407/ >=20 >=20 >=20 >> Am I going to have to change the BIOS (or UEFI) boot order every time >> I want to change which OS comes up when [re]booted? >=20 > Depends. >=20 > First of all, find out if you have a BIOS or a UEFI! :-) >=20 > On the old dual-boot system I had, the "where to boot from" dialog > would come up after POST, and you could press ENTER (choice from last > time was active), or switch over to the other disks. >=20 > This is the task GRUB would be performing in your case. >=20 >=20 >=20 >> Isn't there a boot option key that will bring up a simple selection >> menu BEFORE one or another default OS has taken control? >=20 > Yes, many BIOSes (and probably UEFIs, too) have that. It's PF12 in > many cases (but not always - check the documentation of your = mainboard). >=20 >=20 >=20 >> Perhaps smarter firmware? >=20 > Nonsense. This is standard stuff for more than 20 years now. :-) >=20 >=20 >=20 >> Maybe I could always have BIOS boot from a USB stick that contains >> code to toggle which is going to be considered the primary HDD,=20 >> acting as the director to one of two (or N) primary HDDs? I dunno, >> and reiterate, that I am currently in open eyes and ears mode..... >=20 > This also sounds possible, but inconvenient (as you would have to > make sure boot precedence would always choose that USB stick first, > before attempting to boot from one of the two disks). >=20 >=20 >=20 >> It seems to me that whatever is already sending the boot process >> to one drive, than that is where the change and menu need to exist, >> not on the one drive within its "default" boot OS; I do not want a >> default OS, if possible. I would like my menu to exist 'outside' >> of either (or "any", in the case of 2+ OS boot options) OS and >> internal hard drive. >=20 > But if you choose to use GRUB, that is quite tied to Linux anyway, > so you'll have the "GRUB partition" on the 1st disk (which is the > default load unit) that can then choose what else to boot. You can > conveniently manage its configuration from Linux, while it should > also be possible to do this from FreeBSD - but you don't configure > GRUB several times a day... ;-) >=20 >=20 >=20 >> This Dell system can handle 4 HDDs, so I could have a data HDD >> for each, keeping the OS drives clean, or add external USB HDDs >> along with two more OS internal HDDs (for instance, adding two >> more platforms as further ways of testing code for = platform-independence, >> such as Project Trident, CentOS, Debian, and/or DragonflyBSD >> added to this and a second workstation). >=20 > GRUB should be totally okay to manage those. >=20 >=20 >=20 >> I am not telling Ubuntu's loader to look at a second possibility. >> I guess that what I want is the system's BIOS to provide the menu, >> read the OS boot selection, and load up an OS appropriately? Does >> that sound sane and possible? >=20 > Yes, it does. Check the documentation about whatever you have, if > the support for this feature is there. >=20 >=20 >=20 >> I hope that my understanding of what is/can be done is = near-to-correct, >> and if not, appreciate steps (or a URL) that educates me and shows >> me a path of steps) which provides a near-traceover for setting this >> up. >=20 > You should at least read aboput how the booting is performed, and > which stages are encountered. For FreeBSD, "man 8 boot" provides > a good introduction. It's not much different for Linux, even with > GRUB in the mix, as I simplified (I wouldn't say "explained") a > few paragraphs above. >=20 > It's important that you make sure the "boot chain" toward FreeBSD > is complete (MBR boot sector installed, correct boot partition named, > contains loader, correct root partition named, contains kernel, > and so on). This should be the _default_ way of actions taken by > the installer "bsdinstall". >=20 >=20 >=20 >> If there are 'dual-boot' setup steps before and/or after the FreeBSD >> install, please indicate them, as well as their place in the overall >> sequence.=20 >=20 > There shouldn't be anything surprising... :-) >=20 >=20 >=20 >=20 > --=20 > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... >=20 Frank frankfenderbender@council124.org