Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Gentoo Installation Through Serial Console?
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
NiceGuy
Guru
Guru


Joined: 12 Jun 2006
Posts: 451
Location: Canada

PostPosted: Thu May 07, 2009 9:07 pm    Post subject: [SOLVED]Gentoo Installation Through Serial Console? Reply with quote

Hi everyone,

Does anyone know if it is possible to install Gentoo through a serial console? I mean does the current LiveCD support this, I have attempted but never get anything displayed on my serial console terminal (minicom) on my laptop.

Thanks for your help
_________________
success is the ability to go from one failure to the next without any loss of enthusiasm


Last edited by NiceGuy on Tue May 12, 2009 6:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
ewaller
Apprentice
Apprentice


Joined: 11 Aug 2005
Posts: 264
Location: Pasadena, CA

PostPosted: Fri May 08, 2009 4:17 am    Post subject: Reply with quote

I would think so. If not with a stock CD, with a slightly modified one. All one should have to do is ensure is to enable a serial port login in /etc/inittab.

I have an HP51 calculator with a USB interface that appears as /dev/ttyUSB0 when I attach it. I have a terminal emulator that runs on that calculator which can talk to my laptop as if it is a serial terminal through the above dev node. The cool part, is when X hangs on my laptop, I can plug in the calculator, fire up it's terminal app, and login to my laptop. From there I can command an orderly shutdown. All I had to do was at /dev/ttyUSB0 to /etc/inittab.

My point is, I am certain a serial terminal could be used for an install with an appropriate inittab file.
_________________
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10590
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri May 08, 2009 11:41 am    Post subject: Reply with quote

HP-51? What's that? (Closet calculator enthusiast here.)

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
NiceGuy
Guru
Guru


Joined: 12 Jun 2006
Posts: 451
Location: Canada

PostPosted: Fri May 08, 2009 7:19 pm    Post subject: Reply with quote

Hi again,

I have been able to (thus far) get the liveCD/liveUSB to transmit to the serial console which will in the end allow me to do the installation through the serial console.
This is what I did:
1. Mounted (then copied) the gentoo livecd iso.
2. Mounted (then copied) the image.squashfs from the within the livecd
3. Edited the image.squashfs/etc/inittab to allow serial console ttyS0
4. Edited image.squashfs/etc/securetty to allow root access for ttyS0 and ttys/0
5. Added "console=ttyS0, 115200n8" to isolinux.cfg kernel line
6. Remastered the iso
7. Rebooted using serial console
8 Done

The only thing left now is I need to find a way to get grub on the liveCD/liveUSB then get the grub menu[/b]to display to the serial console ... again the liveCD uses isolinux as it boot loader not grub.
Thanks
_________________
success is the ability to go from one failure to the next without any loss of enthusiasm


Last edited by NiceGuy on Sat May 09, 2009 1:00 am; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10590
Location: Somewhere over Atlanta, Georgia

PostPosted: Fri May 08, 2009 10:58 pm    Post subject: Reply with quote

See "Serial terminal: Using GRUB via a serial line" in the grub Texinfo manual. Type
Code:
info grub
Seems to be pretty straightforward.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
NiceGuy
Guru
Guru


Joined: 12 Jun 2006
Posts: 451
Location: Canada

PostPosted: Sun May 10, 2009 3:10 pm    Post subject: Reply with quote

Hi,
Quote:
See "Serial terminal: Using GRUB via a serial line" in the grub Texinfo manual. Type

Yes, I read that previously, however it unfotunetly descirbes the process of having grub displayed on a disk with gentoo installed already.
My situation is slighly differnent in that what I am trying to achieve is:
Code:
1. With a Gentoo minimal LiveCD, create a Gentoo minimal LiveUSB
2. With the Gentoo LiveUSB have grub as its boot loader.
3. With Grub installed on the LiveUSB, set to display its grub menu to the serial console.
4. Once grub menu from the liveUSB is displayed to serial console, perform a typical gentoo install (but through serial console of course)


I would have to say that in all ... my two delemma's are ... 1. Installing the grub/grub menu on the liveUSB ... and ... 2. Having the grub menu from the LiveUSB to redirect/display on the serial console.

In truth .. if I can get grub and the grub menu installed on the LiveUSB ... I probably won't have a hard time getting the grub menu to display/redirect to the serial console since I have done it before with a full gentoo install by simply adding to the grub.conf
Code:
serial --unit=0 --speed=115200
terminal --timeout=10 serial console


So in summary ... my problem now is simply getting grub on the LiveUSB ... been having problem as the closet I ever got was to having grub installed in the liveUSB ... but after booting into the LiveUSB I never get a grub menu only the grub prompt aka
Code:
grub>


Which simply is no good .. Regardless ... any sugeestions out there, I'd appreciate the help.
Thanks
_________________
success is the ability to go from one failure to the next without any loss of enthusiasm
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Mon May 11, 2009 1:12 am    Post subject: Reply with quote

putting grub on a usb stick is as simple as:
plug the stick into a linux computer that has grub installed;
if needed, format the stick;
if needed, mount the stick (probably auto mounted already if system is current style {assume /media/disk substitute your value below})
Code:
cp  -rf /boot /media/disk
echo "usbstick" > /media/disk/boot/usbstick
ls -l /media/disk # verify the copy
ls -l /media/disk/boot # verify the copy
ls -l /media/disk/boot/grub # verify the copy
grub
find /boot/usbstick
# return should be formatted like (hdx,y)
root (hdx,y) # substitute the returned digits for x,y
setup (hdx) # substitute the returned digits for x
quit


Assume bios will be set to boot the usb stick as primary drive when it is in use; edit /media/disk/boot/grub/grub.conf:

USBSTICK
root (hd0,0)
kernel (hd0,0)/boot/<your kernel name> rootdelay=12 root=<some device with a system / that is compatible with the aforementioned kernel>

this works as an emergency boot device, may not adapt to your needs.

http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick provides a more developed approach.

HTH
Back to top
View user's profile Send private message
NiceGuy
Guru
Guru


Joined: 12 Jun 2006
Posts: 451
Location: Canada

PostPosted: Mon May 11, 2009 5:26 pm    Post subject: Reply with quote

Hi again,

I installed grub onto my USB stick. It appears to boot up my USB grub properly as I can now see the grub menu, however it keeps getting stuck when it is trying to load the kernel on the USB
Code:
Please append correct "root="
VFS unable to mount root fs unknown-block(2,0)


Again .. I am trying to make a LiveUSB .. similar to a LiveCD .. that utilizes grub instead of isolinux as its boot loader.
Any Ideas? Anyone?
Thanks
_________________
success is the ability to go from one failure to the next without any loss of enthusiasm
Back to top
View user's profile Send private message
NiceGuy
Guru
Guru


Joined: 12 Jun 2006
Posts: 451
Location: Canada

PostPosted: Mon May 11, 2009 6:00 pm    Post subject: Reply with quote

Here is more information for my particular problem:
grub.conf
Code:
default 0
timeout 30

title=USB Stick1
root(hd0,0)
kernel /boot/k2.6.24-r7 root=/dev/ram0 init=/linuxrc  dokeymap looptype=squashfs loop=/image.squashfs cdroot initrd=gentoo.igz vga=791


USB directory Structure (/media/usbdisk/):
Code:
name@laptop:/media/usbdisk$ ls
boot  gentoo.efimg  gentoo.efimg.mountPoint  image.squashfs  isolinux  livecd


USB directory structure (/media/usbdisk/isolinux)
Code:
name@laptop:/media/usbdisk/isolinux$ ls
boot.cat  elilo.efi  gentoo  gentoo.igz  isolinux.bin  isolinux.cfg  memtest86  System.map-gentoo


USB directory structure (/media/usbdisk/boot)
Code:

user@laptop:/media/usbdisk/boot$ ls
config-k2.6.24.r7  grub  k2.6.24-r7  System.map-k2.6.24-r7  usbstick


USB directory structure (/media/usbdisk/boot/grub)
Code:
name@laptop:/media/usbdisk/boot/grub$ ls
e2fs_stage1_5  ffs_stage1_5   grub.conf         jfs_stage1_5  minix_stage1_5     stage1  stage2_eltorito  vstafs_stage1_5
fat_stage1_5   glidevice.map  iso9660_stage1_5  menu.lst      reiserfs_stage1_5  stage2  ufs2_stage1_5    xfs_stage1_5


Hope this help to clarify my problem
Thanks again
_________________
success is the ability to go from one failure to the next without any loss of enthusiasm
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Mon May 11, 2009 6:10 pm    Post subject: Reply with quote

usb sticks or drives need the rootdelay=12 (or some other number of seconds) in the kernel line to allow them to "settle" before the root can be read.

does
Quote:
k2.6.24-r7
have support for ramfs squashfs?
Back to top
View user's profile Send private message
NiceGuy
Guru
Guru


Joined: 12 Jun 2006
Posts: 451
Location: Canada

PostPosted: Mon May 11, 2009 6:31 pm    Post subject: Reply with quote

Quote:
Does K2.6.24-r7 have support for ramfs, squashfs

- Yes

Quote:
rootdelay=12

Unfortunately that does not resolve the problem either. My attempts to create a LiveUSB with a grub boot loader appear futile.

Will continue to monitor in hopes of resolving.
Thanks
_________________
success is the ability to go from one failure to the next without any loss of enthusiasm
Back to top
View user's profile Send private message
NiceGuy
Guru
Guru


Joined: 12 Jun 2006
Posts: 451
Location: Canada

PostPosted: Mon May 11, 2009 9:19 pm    Post subject: Reply with quote

Hi everyone,

I believe I am very close (but still a ways off). I can get grub to load my kernel ... but as it is booting it complains that
Code:
No filesystem could mount root, tried:  reiserfs ext3 ext4dev ext2 cramfs squashfs vfat iso9660 hfsplus hfs ntfs udf xfs[
Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(1,0)


Any Ideas out there on how to mount the root filesystem, provided from gentoo minimal cd with grub as boot loader???


/media/usbdisk/boot/grub/grub.conf
Code:
default 0
timeout 30

title=USB Stick1
root(hd0,0)
kernel /boot/k2.6.24-r7 root=/dev/ram0 init=/linuxrc  dokeymap looptype=squashfs loop=/image.squashfs cdroot initrd=gentoo.igz vga=791


I believe my problem is as simple as understanding ... what kernel parameters I must/need to pass to the kernel on my converted liveUSB inorder for this to work.
Any Ideas??
_________________
success is the ability to go from one failure to the next without any loss of enthusiasm
Back to top
View user's profile Send private message
NiceGuy
Guru
Guru


Joined: 12 Jun 2006
Posts: 451
Location: Canada

PostPosted: Tue May 12, 2009 6:53 pm    Post subject: Reply with quote

HI again,

Just wanted to close this post ... I posted a complete solution .. here
https://forums.gentoo.org/viewtopic-t-763379-highlight-.html

That encapsulates this problem
Thanks
_________________
success is the ability to go from one failure to the next without any loss of enthusiasm
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