[gentoo-user] Re: grub-2 update

2015-07-17 Thread James
Steven Lembark lembark at wrkhors.com writes:


 Solution that works for me:

  - Compile the kernel with everything built-in leaving modules for the 
few things that really need to be reloadable. Turn everything in 
the bloody thing off. This avoids the need for a kernel-specific
filestem in the initrd.

I have to prune your posting per Gmane rules of brevity.

  - This since you don't need any modules in the initrd a 
simple, static solution with busybox and init something
like:

I like what you have posted, very much.

  - Run grub2-mkconfig once. 

  - Never touch the grub.cfg file ever again (unless you switch the
boot filesystem type). If I went from XFS - btrfs for the root
filesystem I'd have to hack the insmod xfs entries, nothing
more. 


I'm not ready to use this on my main system, atm. However, I have
been contemplating a new level of (gentoo) install that is less
than a default (basic) install with a reduced number of packages.
I even have decided to put all the tools (codes, packages etc)
onto a separate partition (usb stick) related to compiling. 
The idea is to build up from scratch what is needed; with a verified
DAG of the installed system. Your approach to kernel and boot management
is something I'm going to have to experiment with a bit before 
confidence would allow me to put this idea into my critical path.

I am very fascinated by your approach. It does look a wee bit like
bootstrapping a LFS or openVZ system. Do you have some resources for
recommended reading?

Do you use this in a virtualized approach to system management?


curiously,
James






[gentoo-user] Re: grub-2 update

2015-07-17 Thread James
Neil Bothwick neil at digimed.co.uk writes:


  So if I do this, what will I have to do to keep the system booting.

 Nothing, I installed r7 on June 26th and the system just kept booting.

 You can run grub-install if you really want to, but as this is a patch
 level update to the same version, the MBR code is likely to be the same
 anyway.


OKI'll give it a shot.

thx,
James







Re: [gentoo-user] Re: grub-2 update

2015-07-17 Thread wraeth
On Fri, Jul 17, 2015 at 08:36:51AM +0100, Neil Bothwick wrote:
 could try it on. But it's a headless MythTV backend in the loft, so
 there will be fun and games if it doesn't boot. 

Wouldn't it be more accurate to say there will be _no_ fun and games if
it doesn't boot?

-- 
wraeth wra...@wraeth.id.au
GnuPG Key: B2D9F759


signature.asc
Description: Digital signature


Re: [gentoo-user] Re: grub-2 update

2015-07-17 Thread Neil Bothwick
On Thu, 16 Jul 2015 19:54:31 -0400, Jonathan Callen wrote:

 The Gummiboot project is no longer maintained, it has been merged into
 systemd as systemd-boot (note that using any other part of Systemd
 should *not* be required to use systemd-boot, but I don't know for
 sure because I do not have any non-systemd systems).

Interesting, I missed that. I've re-emerged systemd with the gnuefi flag
and it just worked. I do have a UEFI system without systemd that I
could try it on. But it's a headless MythTV backend in the loft, so
there will be fun and games if it doesn't boot. 


-- 
Neil Bothwick

Top Oxymorons Number 11: Terribly pleased


pgpiJMGvHsJzD.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Re: grub-2 update

2015-07-17 Thread wraeth
On Fri, Jul 17, 2015 at 10:40:16AM +0100, Neil Bothwick wrote:
 On Fri, 17 Jul 2015 18:45:59 +1000, wraeth wrote:
 
   could try it on. But it's a headless MythTV backend in the loft, so
   there will be fun and games if it doesn't boot.   
  
  Wouldn't it be more accurate to say there will be _no_ fun and games if
  it doesn't boot?
 
 Well, with no TV to watch, I'd have to entertain the wife somehow ;-)
 

Touché

-- 
wraeth wra...@wraeth.id.au
GnuPG Key: B2D9F759


signature.asc
Description: Digital signature


Re: [gentoo-user] Re: grub-2 update

2015-07-17 Thread Neil Bothwick
On Fri, 17 Jul 2015 18:45:59 +1000, wraeth wrote:

  could try it on. But it's a headless MythTV backend in the loft, so
  there will be fun and games if it doesn't boot.   
 
 Wouldn't it be more accurate to say there will be _no_ fun and games if
 it doesn't boot?

Well, with no TV to watch, I'd have to entertain the wife somehow ;-)


-- 
Neil Bothwick

Hard work has a future payoff. Laziness pays off now.


pgpbIZYILBNMU.pgp
Description: OpenPGP digital signature


[gentoo-user] Re: grub-2 update

2015-07-16 Thread James
Alan McKinnon alan.mckinnon at gmail.com writes:


 The don't use it, grub:0 still works just fine 

It's all working fine (atm). But changes are problematic, or at least
they have been in the past

 I gave grub-2 a try earlier this week and once again couldn;t figure out
 how to install that mini-OS that bootstraps a boot loader which
 bootstraps a boot loader which loads code that loads a kernel. So back
 to grub:0 for me


I do not really want to go to back to grub-legacy. I do not what to
be bound to (u)efi booting either.  You could just lie to me
and make us both happy?


Most safe (least hassle):: I guess I should just mask it and stay on::
sys-boot/grub- 2.02_beta2-r3

It's been fine even with multiple kernel updates...


James







[gentoo-user] Re: grub-2 update

2015-07-16 Thread James
Alec Ten Harmsel alec at alectenharmsel.com writes:

Grub-2.02_beta2-r3  wants to upgrade to  grub-2.02_beta2-r7   


 It looks like he’s going from grub-2.02 to grub-2.02. I don’t think
   any action is necessary.

Notice r3-- r7
Grub 2 can be a bear in sheep's clothing



 I know that for servers it’s common to have a bunch of partitions to
prevent a rogue process from filling up the entire disk and tanking the
entire system, but I can’t imagine it’s that much more complex.

I spent days during early kernel upgrades getting grub2 happy.
The last (2) kernel updates when smooth.  I was also curious if
anyone else has upgraded to

grub- 2.02_beta2-r7   ?


James



Re: [gentoo-user] Re: grub-2 update

2015-07-16 Thread Steven Lembark

Solution that works for me:

 - Compile the kernel with everything built-in leaving modules for the 
   few things that really need to be reloadable. Turn everything in 
   the bloody thing off. This avoids the need for a kernel-specific
   filestem in the initrd.

 - This since you don't need any modules in the initrd a 
   simple, static solution with busybox and init something
   like:

#!/bin/busybox sh

/bin/busybox --install -s;
sync;

mount -t proc   none /proc;
mount -t sysfs  none /sys;

/sbin/mdadm --verbose --assemble --scan;
/sbin/vgscan--verbose;
/sbin/vgchange  --verbose -a y /dev/vg00/root;

mount /dev/vg00/root /mnt/root;
mount;

exec /sbin/switch_root /mnt/root /sbin/init;

Add whatever you need for encryped filesytems, but it 
won't have to change over time unless you change the 
boot requirements.

Add a copy of busybox, switch_root, init, a static copy of lvm 
into something like /boot/standard-init.cpio.gz.  Mine is in 
/usr/src/initrd with two sub's standard and rescue differing 
only in the init script. A second initrd the last line commented 
out as /boot/rescue-init.cpio.gz for cases where switch_root gets 
unhappy.

#!/bin/bash --login

cd $(dirname $0);

for i in */init;
do
dir=$(dirname $i);
name=$(basename $dir);

(
cd $dir;
kleenfilz;
find .  |
cpio -o -Hnewc  |
gzip -9v /boot/$name.cpio.gz) 
done

wait;

ls -lt /boot;

exit 0;

builds and installs the initrd's easily enough (kleenfilz
is a shell sub that removes editor cruft, no reason to leave
*~ files :-).

 - Add /etc/grub.d/09_custom (i.e., into the config *before* the
   junk that 10 adds in) like the one below. Note that this uses
   the symlink /boot/vmlinuz with the static init. The current
   portion comes from a second vmlinuz.stable symlink I curate
   manually to the last kernel that lived for a while and never,
   ever caused problems [not that I've ever botched a config
   siwtch. no, really...].
   
   The standard link and fixed init-script allow a static copy of the 
   grub config file with /boot/vmlinuz and /boot/standard.cpio.gz
   hardwired.

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry 'current standard' --class gentoo --class gnu-linux --class gnu 
--class os $menuentry_id_option 
'gnulinux-simple-e18157fe-1330-4cbb-8374-125d9c26e360' {
load_video
if [ x$grub_platform = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 
--hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 
e18157fe-1330-4cbb-8374-125d9c26e360
else
  search --no-floppy --fs-uuid --set=root 
e18157fe-1330-4cbb-8374-125d9c26e360
fi
echo'Loading Linux ...'
linux   /boot/vmlinuz root=/dev/sdc1 ro
echo'Loading initrd ...'
initrd  /boot/standard.cpio.gz
}

menuentry 'current rescue' --class gentoo --class gnu-linux --class gnu --class 
os $menuentry_id_option 'gnulinux-simple-e18157fe-1330-4cbb-8374-125d9c26e360' {
load_video
if [ x$grub_platform = xefi ]; then
set gfxpayload=keep
fi
insmod gzio
insmod part_msdos
insmod xfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 
--hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  
e18157fe-1330-4cbb-8374-125d9c26e360
else
  search --no-floppy --fs-uuid --set=root 
e18157fe-1330-4cbb-8374-125d9c26e360
fi
echo'Loading Linux ...'
linux   /boot/vmlinuz root=/dev/sdc1 ro
echo'Loading initrd ...'
initrd  /boot/rescue.cpio.gz
}


 - Run grub2-mkconfig once. 

 - Never touch the grub.cfg file ever again (unless you switch the
   boot filesystem type). If I went from XFS - btrfs for the root
   filesystem I'd have to hack the insmod xfs entries, nothing
   more. 

-- 
Steven Lembark 3646 Flora Pl
Workhorse Computing   St Louis, MO 63110
lemb...@wrkhors.com  +1 888 359 3508



Re: [gentoo-user] Re: grub-2 update

2015-07-16 Thread Heiko Baums
Am 16.07.2015 um 22:05 schrieb James:

 I spent days during early kernel upgrades getting grub2 happy.

You only need to run `grub2-mkconfig -o /boot/grub/grub.cfg` after each
kernel update. I'm using grub2 not for such a long time, but I made some
kernel upgrades since I switched from grub-legacy to grub2 and had no
problems so far.

 The last (2) kernel updates when smooth.  I was also curious if
 anyone else has upgraded to
 
 grub- 2.02_beta2-r7   ?

I don't know when or if it was updated after I switched to grub2, but I
have grub 2.02_beta2-r7 installed and had no problems with it either.

But what can happen at worst when you update a boot loader? That your
boot loader fails to boot. So you can still boot from a LiveCD and
select the option Boot from harddrive. Then you can easily fix the
boot loader.



[gentoo-user] Re: grub-2 update

2015-07-16 Thread James
Jarry mr.jarry at gmail.com writes:


 I have similar setup as you and upgraded grub without any
 problem. If beta2-r3 worked for you, beta2-r7 will as well.
 If you did not disable /boot automount, there are no special
 steps needed. Portage will mount /boot, update grub, and
 dismound afterwards...


AH   do tell me more::


/dev/sda1   /bootext2defaults,noatime 0 2
/dev/sda3   /ext4defaults,noatime 0 1
/dev/sda4   /usr/local   ext4defaults,noatime 0 1

How do I make sure it's set to automount?

changes I should make ?? I've been bitten too many times
on kernel updates to not be very cautious

James






Re: [gentoo-user] Re: grub-2 update

2015-07-16 Thread Jarry

On 16-Jul-15 22:08, James wrote:


I have similar setup as you and upgraded grub without any
problem. If beta2-r3 worked for you, beta2-r7 will as well.
If you did not disable /boot automount, there are no special
steps needed. Portage will mount /boot, update grub, and
dismound afterwards...


AH   do tell me more::

/dev/sda1   /bootext2defaults,noatime 0 2
/dev/sda3   /ext4defaults,noatime 0 1
/dev/sda4   /usr/local   ext4defaults,noatime 0 1

How do I make sure it's set to automount?


It is per default so. You can only disable it by some
variable (forgot its name). If you want to be sure, simply
mount /boot (if it is not yet) before updating grub.


changes I should make ?? I've been bitten too many times
on kernel updates to not be very cautious-- 


No changes are necessary. Config-files remain as they were.
I'have been using grub2 since it went stable and never had
any problem with it...

Jarry
___
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.



Re: [gentoo-user] Re: grub-2 update

2015-07-16 Thread Neil Bothwick
On Thu, 16 Jul 2015 20:01:29 + (UTC), James wrote:

  I gave grub-2 a try earlier this week and once again couldn;t figure
  out how to install that mini-OS that bootstraps a boot loader which
  bootstraps a boot loader which loads code that loads a kernel. So back
  to grub:0 for me  
 
 I do not really want to go to back to grub-legacy. I do not what to
 be bound to (u)efi booting either.  You could just lie to me
 and make us both happy?

If you have UEFI, then just use Gummiboot, it's much simpler.


-- 
Neil Bothwick

If it ain't broke, break it and charge for repair.


pgpebtup_Mj5U.pgp
Description: OpenPGP digital signature


[gentoo-user] Re: grub-2 update

2015-07-16 Thread Jonathan Callen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 2015-07-16 17:41, Neil Bothwick wrote:
 On Thu, 16 Jul 2015 20:01:29 + (UTC), James wrote:
 
 I gave grub-2 a try earlier this week and once again couldn;t
 figure out how to install that mini-OS that bootstraps a boot
 loader which bootstraps a boot loader which loads code that
 loads a kernel. So back to grub:0 for me
 
 I do not really want to go to back to grub-legacy. I do not what
 to be bound to (u)efi booting either.  You could just lie to me 
 and make us both happy?
 
 If you have UEFI, then just use Gummiboot, it's much simpler.
 
 

The Gummiboot project is no longer maintained, it has been merged into
systemd as systemd-boot (note that using any other part of Systemd
should *not* be required to use systemd-boot, but I don't know for
sure because I do not have any non-systemd systems).

- -- 
Jonathan Callen
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBCgAGBQJVqEQ0AAoJEEIQbvYRB3mgtToP/AgKlQrdkgMq5ss8n/uO5hwl
iBMu9+iFE7NRyp8tu/KZ7QPmVTwrkNu3WtmquhNakUj12ryI+mGQ/PHdcEB/p3LD
9vlxLWemj7HI4Qk+RZZqNThOCXAYP+mc3i3T2NgKgYuceoIk/z+kwAPVfnmqSjlZ
QyYS5sveoVwM43AdqbatAvt8n2BEmYbTz9PjZ5zcrRYTpZphqltdU29NbzCvsYVU
BOf10p5kzSi9G+Aph89RBpQhowL9iwVDLalZ/NUKk588ZyQLi78JotghnCGUJ9Ig
1492fMcIsqiAkOkSuVoPtiOu0SITaHyDTOHfE20+QtOm29HM1Hm9MrV94FkQGY92
Bdl/a6BIZssbNgLiNuayo9V3OV/JoSlPjp52a4h2d/Vu+NxKyvjswwK6LFae/ka5
pf9bAqiq2jEl21yboskH35EbYDciZddG48r5VMQl0hplplkCoLrBUVlvdW8M/28a
Yu9IH19+VpqAOuahmOJvMQ5/OOHRVj7RRzJC51YGPXR2uSxcV5SDLCIts6Oiww+w
qI7aVang9JibuY166T2j4LYWGEXjeO7xE3xk7kWKO6l/608uLA4Vyrt/vaFLsJL1
XrxWzcBQ+lVnY/+g8tv6q0nINhVQ551ugUxCilTJzHmSCT/1aAa7Bx0YS+5LwyRq
qqWwjSTxzG6yl88l6ys2
=ys3e
-END PGP SIGNATURE-