From owner-freebsd-questions@freebsd.org Tue Oct 29 07:07:14 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A108917C4DA for ; Tue, 29 Oct 2019 07:07:14 +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 472N1s628qz49bq for ; Tue, 29 Oct 2019 07:07:13 +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 1D2161A26B0; Tue, 29 Oct 2019 03:07:05 -0400 (EDT) Subject: n-boot systems, bootloaders, and grub Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Frank Fenderbender Date: Tue, 29 Oct 2019 00:07:03 -0700 Reply-To: Frank Fenderbender Content-Transfer-Encoding: quoted-printable Message-Id: <57ABB44D-96E6-45F5-9837-1B66EF4C30DF@council124.org> To: freebsd-questions@freebsd.org X-Mailer: Apple Mail (2.1085) X-Rspamd-Queue-Id: 472N1s628qz49bq X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; 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.07 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[frankfenderbender@council124.org]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:cegray.mail.pairserver.com]; HEADER_FORGED_MDN(2.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[council124.org]; RCPT_COUNT_ONE(0.00)[1]; REPLYTO_EQ_FROM(0.00)[]; IP_SCORE(-0.28)[ipnet: 216.92.0.0/16(-0.18), asn: 7859(-1.15), country: US(-0.05)]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; MV_CASE(0.50)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.991,0]; 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: Tue, 29 Oct 2019 07:07:14 -0000 I am seeking clarification on using 'update-grub' and/or = 'grub-mkconfig'. Here's the details upon which I am working. Systems: two Dell Precision 5820 Tower Workstations, each currently = using 4 internal HDs. Primary/default OS on both systems: Ubuntu 18.04. Goal: add three (3) more operating systems (FreeBSD, Fedora, Debian = added on one; Window10, GhostBSD, DragonflyBSD added onto the other). Required process: a step-wise installations with intermittent backup = and and modification of GRUB (v2.x). Okay, I've read about two methods of creating my N-boot system. The essence of "Method 1" is: $ sudo gedit /etc/default/grub # menu will list ordered boot/bootloader options # the "primary" will need to have the highest "GRUB_DEFAULT" number # the list, with just a primary OS, starts with 0 # to add a secondary OS, add its section, and increment the primary # # with four OSs, the primary OS ends up set as 3=20 # and the secondary OSs will be set at 0, 1, and 2 GRUB_DEFAULT=3D3 GRUB_DEFAULT=3D2 GRUB_DEFAULT=3D1 GRUB_DEFAULT=3D0 # the OS-adding and default-tweaking must be done one-at-a-time # with the use of a tool, 'update-grub', in-between. The second, method, which I am opting for, because it is said to be less = complicated, is: $ sudo gedit /etc/default/grub # change variable from original GRUB_DEFAULT=3D0 to GRUB_DEFAULT=3Dsaved # also, change the default time allowed in menu before the default # for the primary OS starts, i.e., the one with the highest number, # however, will that be added into the file by the 'grub-set-default' # method below? GRUB_TIMEOUT=3D15 # save the edit session # update the grub.cfg file $ sudo update-grub # run command $ sudo grub-set-default 'Ubuntu 18.04 (loader) (on /dev/sda1)' # there is no longer a need to set a number, since the list option is = explicit # now, add other OSs for each OS and HD# # '[OS name] (loader) (on /dev/sd[hdd#][partition#])', such as # $ sudo grub-set-default 'Ubuntu 18.04 (loader) (on /dev/sda1)' # $ sudo grub-set-default 'FreeBSd (loader) (on /dev/sda2)' # $ sudo grub-set-default 'Fedora 12 (loader) (on /dev/sda3)' # $ sudo grub-set-default 'Debian (loader) (on /dev/sda4)' I'm leaning towards Method2, as it is said to be "safer".=20 No explanatory evidence for that statement was given. I am using the following as references (versus the search results with = uncertain starting points): How Linux Works (2nd ed. - 2015) - by Brian Ward Linux Administration: A Beginner's Guide (7th ed. - 2016) - by Wale = Soyinka Ubuntu 16.04 LTS Desktop Applications and Administration (2016) - by = Richard Peterson GNU Grub Reference Manual (2012) - by Matzigkeit, Okuji, Watson, Bennett As I understand it so far, the UEFI partition on sda will be home to the = one-and-only grub installation on the system (on sda in its /boot/grub = directory's grub.cfg file). After having its boot presented-list has received a valid selection = input, it will direct the system boot process to the correct operating = system /boot directory on either sda, sdb, sdc, or sdd. I have partitions on sda set up as: partition type mount-pt actual-size notes --------- ------- ------------ ----------- ------ free space 1M for MBR backward-compatibility /dev/sda1 fat32 /boot/efi 1G size input covers the preceding 'free = space' /dev/sda2 fat32 /biosgrub 10M /dev/sda3 ext4 /boot 4G /dev/sda4 ext4 / 300G "root partition", used for the OS /dev/sda5 ext4 swap 12G /dev/sda6 ext4 /usr 20G /dev/sda7 ext4 /tmp 12G /dev/sda8 ext4 /usr/local 50G /dev/sda9 ext4 /home 450G On sdb (and likewise, substituting "sdc" or "sdd" for the other = secondary OSs)=20 the partitions are: free space 2.1M /dev/sdb1 fat32 /biosgrub 34M /dev/sdb2 ext4 /boot 4.2G /dev/sdb3 ext4 / 315G "root partition", used for the OS /dev/sdb4 ext4 swap 13G /dev/sdb5 ext4 /usr 20G /dev/sdb6 ext4 /tmp 12G /dev/sdb7 ext4 /usr/local 50G /dev/sdb8 ext4 /home 450G Although additional comments are welcomed offline, my question is based = in seeing two recommendations for updating the "live" grub.cfg file, = after each install-step, via running a referred-to command on = /use/default/grub in order to create that "live" file.=20 Two tools have been given, and, understanding their general use, I am = trying to understand their specific use. So, can you tell me what the difference(s) between, the = [dis]advantage(s) of each, and the system/kernel requirement(s) of/for = using the 'update-grub' and/or 'grub-mkconfig' commands? I might guess that... one is a specific to one OS (wrapped around Linux) over another; it is the release of the Canonical Linux kernel (4.x versus 5.x); it is more robust; it reduces the number of "outside-of-the-tool" steps wherein higher = possibility for error awaits. That is just me guessing. I've seen both commands referenced in reading about both methods. I appreciate your review of this topic and any knowledge gleaned from = your own n-boot setup experience. Thanks much. "Frank"