Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Live CD passwd option
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message

Joined: 13 Feb 2014
Posts: 18

PostPosted: Mon Feb 17, 2014 2:44 pm    Post subject: Live CD passwd option Reply with quote


I'm trying to find a way to install Gentoo remotely via ssh on any dedicated server running Linux, even if the server is not initially running Gentoo (could be Centos or Debian for example).

The idea is to create a boot entry in grub2 that will boot on the installation iso cd image on the next reboot. Since the installation cd can automatically start sshd (with the dosshd option), I could then do the installation via ssh.

I'm testing the grub configuration on my Fedora laptop before I decide to do this on the remote server.
Everything is working but the passwd=foo option of the live cd doesn't seem to work.

Here's my grub2 entry in the /etc/grub.d/40_custom file:



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 'Test Gentoo Install CD'{
    insmod part_msdos
    insmod ext2
    loopback loop (hd0,msdos1)/install-amd64-minimal-20140206.iso
    linux (loop)/isolinux/gentoo root=/dev/ram0 init=/linuxrc looptype=squashfs loop=/image.squashfs cdroot initrd=gentoo.igz isoboot=/install-amd64-minimal-20140206.iso nokeymap nosound docache quiet dosshd passwd=supersecret123
    initrd (loop)/isolinux/gentoo.igz

So, when I reboot on this entry, everything seems to be working. The sshd daemon is running.
One thing that surprises me though, is that I get a command line without being asked my password. Well, that's not really a problem, just surprising.
Now I want to test if I can log with ssh.

I do
ssh root@localhost

I accept the rsa key and I'm asked my password.
I then type the password I had set up via the passwd=supersecret123 entry in my grub2 menuentry.
I'm asked my password again. I check I didn't do a typo. I retype the password. I'm sure I'm typing it well. But this fails.

cat /var/log/messages

livecd sshd[24969]: pam_unix(sshd: auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=livecd.gentoo user=root
livecd sshd[24965]: error: PAM: Authentication failure from root from livecd.gentoo

Any idea what is going wrong here? It seems the passwd= option is not taken into account and I don't understand why.

Any help would be greatly appreciated.
Back to top
View user's profile Send private message

Joined: 05 Jul 2003
Posts: 43198
Location: 56N 3W

PostPosted: Mon Feb 17, 2014 7:14 pm    Post subject: Reply with quote


You are making things too difficult for yourself.

The hosting company will boot your box in some random 'rescue' distro.
As long as its the right bitness for the install you want to do, proceed as follows.

Follow the instructions from the hosting company to log in and get root in this rescue system.
If /mnt/gentoo does not exist,
mkdir /mnt/gentoo
now follow the handbook, pretending that the rescue system is the liveCD.

You might want to identify your hosting company. Some of us may have some experience with them.


Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message

Joined: 16 Mar 2005
Posts: 14

PostPosted: Tue Feb 18, 2014 4:47 pm    Post subject: Reply with quote

I just ran across pretty much the same problem as the OP. Except I'm not trying to install to some remote dedicated server that is already running a working system, so I really need/want to boot off a Gentoo Linux minimal install USB-Stick (created with unetbootin, using "install-amd64-minimal-20140206.iso") in order to install.

To simplify/speed up the installation process, I changed the file with the boot menu items/boot parameters, and added
docache dosshd keymap=de passwd=somepassword

All these boot parameters seem to be working, except

Because after booting, I can neither authenticate from a remote computer via

nor locally on the machine using
login root

as in both cases it won't accept the password, "somepassword"

If I manually set the root password after booting via the usual way,
passwd root

it works, so I too suspect that there is something wrong with the

boot parameter.

It's not really a big deal for me as I can change the command locally by hand, but I assume that there is either a bug, a misunderstanding, or this passwd boot option doesn't exist anymore.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum