Re: [DNG] reinstalling GRUB2

2019-07-22 Thread fsmithred via Dng

On 7/22/19 12:40 PM, Haines Brown wrote:


So I do
 ...

 # chroot /sysroot

 # grub-install /dev/sdb
 bash grub-install: command not found

 # ls -la /usr/sbin | grep grub-install
 -rwxr-xr-x 1 root root 102046 Oct 28 2018 grub-install

 # /usr/sbin/grub-install /dev/sdb
 # bash: /usr/sbin/grub-install: No such file or directory

At my wits end I remove and reinstall grub2-common. Did not help.



That's pretty weird. If you reinstall the grub-pc package, it will run a 
debconf dialog and ask you where to put the bootloader. I don't know if it 
operates like that in alternate realities, and i think you might be in one.


Check the size on your grub-install. It looks small. (Copy/paste error?)

/usr/sbin/grub-install:
ascii/uefi   1020496 Oct 28  2018


fsmithred
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] reinstalling GRUB2

2019-07-22 Thread Haines Brown
On Mon, Jul 22, 2019 at 06:24:32AM -0400, fsmithred via Dng wrote:
> On 7/22/19 1:48 AM, Steve Litt wrote:
...

I tried the chroot method, but with little luck. I'm set up for BIOS
boot. My /root partion is /sdb1, and my broken out /boot partition is
/dev/sdb2. So for grub-root-device I use /dev/sdb1; for my
grub-boot-device I use /dev/sdb.

> > > 2) use these incantations, lifted from a post elsewhere :
...
> > > chroot /sysroot
> > > grub-install /dev/your-grub-boot-device (may be grub2-install on 
some
> > > distro)

So I do
...

# chroot /sysroot

# grub-install /dev/sdb
bash grub-install: command not found

# ls -la /usr/sbin | grep grub-install
-rwxr-xr-x 1 root root 102046 Oct 28 2018 grub-install

# /usr/sbin/grub-install /dev/sdb
# bash: /usr/sbin/grub-install: No such file or directory

At my wits end I remove and reinstall grub2-common. Did not help.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] reinstalling GRUB2

2019-07-22 Thread Simon Hobson
Haines Brown  wrote:

> I tried the chroot method, but with little luck.
...
># chroot /sysroot 
> 
># grub-install /dev/sdb
>bash grub-install: command not found
> 
># ls -la /usr/sbin | grep grub-install
>-rwxr-xr-x 1 root root 102046 Oct 28 2018 grub-install
> 
># /usr/sbin/grub-install /dev/sdb
># bash: /usr/sbin/grub-install: No such file or directory
> 
> At my wits end I remove and reinstall grub2-common. Did not help.

Sorry, it's outside my knowledge envelope. I know the steps do work as I've 
done them several times in the past. I don't know what the requirements are in 
terms of compatibility between the linux kernel that's booted and the "broken" 
system that you chroot to - are they the same architecture you are using ?
Also, I take it you mounted all the directories (/proc, /dev, etc) ?

In the back of my mind is whether the error message is a result of a lower 
level issue - eg a mismatch between kernel and system.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] Firefox-esr freezes ASCII

2019-07-22 Thread Yevgeny Kosarzhevsky via Dng
On Tue, 9 Jul 2019 at 14:09, Edward Bartolo via Dng  wrote:

> To do normal browsing, I am using Waterfox which is Firefox without
> the late many 'cool' additions.

You can also try palemoon, I am using it for many things on devuan.

-- 
Regards,
Yevgeny
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] reinstalling GRUB2

2019-07-22 Thread Haines Brown
On Mon, Jul 22, 2019 at 06:24:32AM -0400, fsmithred via Dng wrote:
> On 7/22/19 1:48 AM, Steve Litt wrote:
...

I tried the chroot method, but with little luck. I'm set up for BIOS 
boot. My /root partion is /sdb1, and my broken out /boot partition is 
/dev/sdb2. So for grub-root-device I use /dev/sdb1; for my 
grub-boot-device I use /dev/sdb. 

> > > 2) use these incantations, lifted from a post elsewhere :
...
> > > chroot /sysroot
> > > grub-install /dev/your-grub-boot-device (may be grub2-install on some
> > > distro)

So I do
...

# chroot /sysroot 

# grub-install /dev/sdb
bash grub-install: command not found

# ls -la /usr/sbin | grep grub-install
-rwxr-xr-x 1 root root 102046 Oct 28 2018 grub-install

# /usr/sbin/grub-install /dev/sdb
# bash: /usr/sbin/grub-install: No such file or directory

At my wits end I remove and reinstall grub2-common. Did not help.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] reinstalling GRUB2

2019-07-22 Thread Simon Hobson
Steve Litt  wrote:

> Simon Hobson  wrote:

>> 1) use grub rescue cd (which you can put on a USB stick). Then fairly
>> easy to sort out by picking the right menu options.
> 
> Do you mean:
> 
> * Super Grub2 Disk (https://sourceforge.net/projects/supergrub2/)
> * boot-repair-disk (https://sourceforge.net/p/boot-repair-cd/home/Home/)
> * System Rescue CD (http://www.system-rescue-cd.org/)
> * GrubEFIReinstall (https://wiki.debian.org/GrubEFIReinstall)
> * Ultimate Boot CD (http://www.ultimatebootcd.com/)

The first one, SuperGrub2 - more details at https://www.supergrubdisk.org
And step-by-step guide at 
https://www.supergrubdisk.org/wizard-restore-grub-with-super-grub2-disk/

I suspect the others would also be suitable, but not ones I've used (for this)


fsmithred via Dng  wrote:
> Steve Litt wrote:
>> Simon Hobson  wrote:
> 
>>> 
>>> 2) use these incantations, lifted from a post elsewhere :
>>> 
>>> mkdir /sysroot
>>> mount /dev/your-root-dev /sysroot
>>> mount /dev/your-boot-dev /sysroot/boot
>>> mount --bind /dev /sysroot/dev
>>> mount --bind /sys /sysroot/sys
>>> mount --bind /proc /sysroot/proc
>>> mount --bind /run /sysroot/run (recommended if you are using systemd)
>>> chroot /sysroot
>>> grub-install /dev/your-grub-boot-device (may be grub2-install on some
>>> distro)
>> *Exactly* what do you mean by "your-grub-boot-device"? Does it vary
>> depending on MBR vs UEFI?
> 
> Yes, it varies depending on BIOS vs. UEFI boot. For bios boot, the grub boot 
> device is the drive whose mbr you want to use, like /dev/sda or /dev/sdb.
> 
> For UEFI, you don't name the device. Grub knows to put the bootloader in the 
> efi partition. In that case, an extra step above would be to mount the efi 
> partition to /sysroot/boot/efi
> 
>> So now you've installed Grub(2), but then how do you configure grub?
> 
> While you are still in the chroot, run:
> 
> update-grub
> 
> And that will make a new boot menu.

Beat me to it ;-)
This option will re-install Grub as long as you can boot the system from any 
disk containing a vaguely similar Linux - when you chroot you'll be using the 
tools/executables/etc from your "broken" system while running the kernel from 
your recovery system.

So lets say you can boot a system from sda, and your "broken" one is currently 
showing as sdb - with boot as sdb1 and root as sdb2. the relevant lines from 
above would then become :
mount /dev/sdb2 /sysroot
mount /dev/sdb1 /sysroot/boot
...
grub-install /dev/sdb

And as fsmithred says, you can add update-grub to update the menu - this will 
work just as if you'd really booted from sdb.


As to which method is "best", well that's a case of "horses for courses"* I've 
used both methods in the past (not for some time though). The first method is 
providing the bootable system and providing some assistance with the second 
method - probing disks, creating (IIRC) the chroot environment, etc. If you are 
able to boot the system then the second method is just a few commands (which 
you can do remotely, eg via SSH, if required); if you can't already boot the 
system at all then you'll need the boot disk to get it running.

* A phrase meaning to pick the tool best suited for the job. Literally it's 
referring to the fact that different race horses will perform best at different 
courses (or under different conditions) so you pick the one that's best suited 
for the course/conditions.
https://en.wiktionary.org/wiki/horses_for_courses

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] reinstalling GRUB2

2019-07-22 Thread fsmithred via Dng

On 7/22/19 1:48 AM, Steve Litt wrote:

On Sun, 21 Jul 2019 20:25:42 +0100
Simon Hobson  wrote:





2) use these incantations, lifted from a post elsewhere :

mkdir /sysroot
mount /dev/your-root-dev /sysroot
mount /dev/your-boot-dev /sysroot/boot
mount --bind /dev /sysroot/dev
mount --bind /sys /sysroot/sys
mount --bind /proc /sysroot/proc
mount --bind /run /sysroot/run (recommended if you are using systemd)
chroot /sysroot
grub-install /dev/your-grub-boot-device (may be grub2-install on some
distro)


*Exactly* what do you mean by "your-grub-boot-device"? Does it vary
depending on MBR vs UEFI?


Yes, it varies depending on BIOS vs. UEFI boot. For bios boot, the grub 
boot device is the drive whose mbr you want to use, like /dev/sda or /dev/sdb.


For UEFI, you don't name the device. Grub knows to put the bootloader in 
the efi partition. In that case, an extra step above would be to mount the 
efi partition to /sysroot/boot/efi




So now you've installed Grub(2), but then how do you configure grub?


While you are still in the chroot, run:

update-grub

And that will make a new boot menu.



fsmithred



___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng