:: Re: [DNG] reinstalling GRUB2
Forside
Slet denne besked
Besvar denne besked
Skribent: fsmithred
Dato:  
Til: dng
Emne: Re: [DNG] reinstalling GRUB2
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