Re: [DNG] reinstalling GRUB2 - Verion

2019-07-24 Thread terryc
On Wed, 24 Jul 2019 10:45:03 -0400
Haines Brown  wrote:

> I've no idea what's going on. I was told to use the grub2-install
> command, but on my system (Ascii) there is only
> /usr/sbin/grub-install. It seems my grub-install command can be run
> by user, but not by root becasue root has no path to /usr/sbin.

Apart from the other methods already sent to the list, you can also do

As-User> grub-install --version
For that I get ;bash: grub-install: command not found

And if that doesn't work you do;

As-user> sudo grub-install --version


FWIW, I have (ascii) 
grub-install (GRUB) 2.02~beta3-5+deb9u1

So, you just run grub-install and it just runs the last installed
version.

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


Re: [DNG] reinstalling GRUB2

2019-07-24 Thread fsmithred via Dng

On 7/24/19 4:40 PM, Haines Brown wrote:


When I become root with "su", I get the following:

   # grub-install
   bash: grub-install: command not found

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


How are you becoming root? In ascii, either 'su' or 'su -' will give you
*/sbin in your path.


When I am root by means of su - I get the following:

   $ su -
   # grub-install
   Installing for i386-pc platform.
   grub-install: error: install device isn't specified.

   # /usr/sbin/grub-install
   Installing for i386-pc platform.
   /usr/sbin/grub-install: error: install device isn't specified.


In the second case (su -) it finds the command and fails because you 
didn't tell it where to put the bootloader. Like this:


  grub-install /dev/sdb

And then you can run update-grub (for which you do not specify a device.)

Please also run/check the following:

uname -r
cat /etc/issue
cat /etc/devuan_version
apt-cache policy util-linux

fsmithred

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


Re: [DNG] reinstalling GRUB2

2019-07-24 Thread Haines Brown
On Wed, Jul 24, 2019 at 03:35:08PM -0400, fsmithred via Dng wrote:
 
> > I've no idea what's going on. I was told to use the grub2-install
> > command, but on my system (Ascii) there is only
> > /usr/sbin/grub-install.
> 
> grub-install is all I've ever used or seen mentioned in debian.

I suspect my source of info made a typo.

> Please describe what happens when user runs grub-install. And what do you
> get when you run
> echo $PATH
> as user and as root?
> 
> but not by root because root has no path to /usr/sbin.

It seems user has no path to /usr/sbin:

$ echo $PATH
/usr/local/texlive/2018/bin/x86_64-linux:/home/haines/scripts: \ 
  /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
 
I was unaware of "su -". Interesting. 

When I become root with "su", I get the following:

  # grub-install
  bash: grub-install: command not found 

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

> How are you becoming root? In ascii, either 'su' or 'su -' will give you
> */sbin in your path. 

When I am root by means of su - I get the following:

  $ su -
  # grub-install
  Installing for i386-pc platform.
  grub-install: error: install device isn't specified.

  # /usr/sbin/grub-install 
  Installing for i386-pc platform.
  /usr/sbin/grub-install: error: install device isn't specified.

  # update-grub \dev\sdb
  Generating grub configuration file ...
  Found linux image: /boot/vmlinuz-4.9.0-9-amd64
  Found initrd image: /boot/initrd.img-4.9.0-9-amd64
  Found linux image: /boot/vmlinuz-4.9.0-8-amd64
  Found initrd image: /boot/initrd.img-4.9.0-8-amd64
  Found linux image: /boot/vmlinuz-4.9.0-6-amd64
  Found initrd image: /boot/initrd.img-4.9.0-6-amd64
  Found Debian GNU/Linux (9) on /dev/sda1
  Found Debian GNU/Linux (9) on /dev/sdc1
  done

I have not rebooted to test this grub installation on /dev/sdb, for 
what worries me is that my tarbet MBA, /dev/sdb, is not reported as 
having Debian on it. Disk /dev/sda is partitioned the same as /dev/sdb 
(root is sdb1 and /boot is broken out as sdb2). Should # update-grub 
have retuirned the line:

  Found Debian GNU/Linux (9) on /dev/sdb1

> (OT) Does anyone know why they changed the behavior of su? Is there a reason
> why root should have /usr/share/games in the path?

> > Probably not relevant is that every morning I get this cron error:
> > /etc/cron.daily/apt-compat:
> > Cache has broken packages, exiting
> 
> What happens if you empty the cache with 'apt-get clean' or the equivalent?

I believe I already tried that, but I now do it again with su -. Won't 
know if any effect until tomorrow morning.

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


Re: [DNG] reinstalling GRUB2

2019-07-24 Thread Antoine via Dng

On Mon, Jul 22, 2019 at 12:40:40PM -0400, Haines Brown wrote:

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.



If your shell can't find /usr/sbin/grub-install, it might not be in your 
PATH.

There are several ways to check this. You can type

# which grub-install

and if you don't get a result, your shell doesn't know to look there.
You can also try

# echo $PATH | grep '/usr/sbin:'

to get an immediate, easy-to-read result.

Antoine

--
A computer once beat me at chess,
but it was no match for me at kickboxing.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] reinstalling GRUB2

2019-07-24 Thread fsmithred via Dng

On 7/24/19 10:45 AM, Haines Brown wrote:

I seem to be loosing ground. Someone helped me with the chroot method,
but then:

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

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

# ls -la /usr/sbin | grep grub-install
ls: cannot access '/usr/sbin': No such file or directory

# ls -la /usr | grep sbin
[no return]

$ ls -la /usr | grep sbin
drwxr-xr-x   2 root root  12288 Jul 24 08:30 sbin

I've no idea what's going on. I was told to use the grub2-install
command, but on my system (Ascii) there is only
/usr/sbin/grub-install. 


grub-install is all I've ever used or seen mentioned in debian.


It seems my grub-install command can be run
by user, 


Please describe what happens when user runs grub-install. And what do you 
get when you run

echo $PATH
as user and as root?

but not by root becasue root has no path to /usr/sbin.

That was my first thought, until I read the  following in your previous post:


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


It should run when you call it with the full path, even if /usr/sbin is 
not in your path.


How are you becoming root? In ascii, either 'su' or 'su -' will give you 
*/sbin in your path. In beowulf, only 'su -' will give you root's path. 
Just plain 'su' leaves you with user's path.


(OT) Does anyone know why they changed the behavior of su? Is there a 
reason why root should have /usr/share/games in the path?





Probably not relevant is that every morning I get this cron error:
/etc/cron.daily/apt-compat:
Cache has broken packages, exiting



What happens if you empty the cache with 'apt-get clean' or the equivalent?

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


Re: [DNG] reinstalling GRUB2

2019-07-24 Thread Haines Brown
I seem to be loosing ground. Someone helped me with the chroot method,
but then:

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

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

# ls -la /usr/sbin | grep grub-install
ls: cannot access '/usr/sbin': No such file or directory

# ls -la /usr | grep sbin
[no return]

$ ls -la /usr | grep sbin
drwxr-xr-x   2 root root  12288 Jul 24 08:30 sbin

I've no idea what's going on. I was told to use the grub2-install
command, but on my system (Ascii) there is only
/usr/sbin/grub-install. It seems my grub-install command can be run
by user, but not by root becasue root has no path to /usr/sbin.

Probably not relevant is that every morning I get this cron error:
/etc/cron.daily/apt-compat:
Cache has broken packages, exiting


Haines Brown

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


Re: [DNG] reinstalling GRUB2

2019-07-24 Thread Haines Brown
I seem to be loosing ground. Someone helped me with the chroot method, 
but then: 

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

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

# ls -la /usr/sbin | grep grub-install
ls: cannot access '/usr/sbin': No such file or directory

# ls -la /usr | grep sbin
[no return]

$ ls -la /usr | grep sbin
drwxr-xr-x   2 root root  12288 Jul 24 08:30 sbin

I've no idea what's going on. I was told to use the grub2-install 
command, but on my system (Ascii) there is only 
/usr/sbin/grub-install. It seems my grub-install command can be run 
by user, but not by root becasue root has no path to /usr/sbin.

Haines Brown

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


Re: [DNG] reinstalling GRUB2

2019-07-24 Thread aitor

Hi,

En 23 de julio de 2019 1:00:03 fsmithred via Dng  escribió:


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



Debian-installer might do the job as well. With the caution of keeping all 
the data of each partition, of course.


Hope this helps,

Aitor.




Enviado con AquaMail para Android
https://www.mobisystems.com/aqua-mail


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