Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Eject Install CD and reboot from HD remotely
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
akbarstatx
n00b
n00b


Joined: 14 Oct 2002
Posts: 67
Location: Minneapolis, MN

PostPosted: Wed Jan 27, 2010 4:04 am    Post subject: Eject Install CD and reboot from HD remotely Reply with quote

I am doing a remote install on a new box and I want to eject the install cdrom and have the system boot from the hard drive. Is this possible? If I could get ipmi working I could reset the boot order but I don't have that working until I boot the shiny new kernel. Note: opensolaris provides this type of functionality and I am pretty sure linux can do it I just don't know how.

Thanks
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Wed Jan 27, 2010 5:22 am    Post subject: Reply with quote

You can probably just run eject /mnt/cdrom (or wherever it's mounted) in the ssh shell on the remote host. The eject program should exist on the installCD.
Back to top
View user's profile Send private message
akbarstatx
n00b
n00b


Joined: 14 Oct 2002
Posts: 67
Location: Minneapolis, MN

PostPosted: Wed Jan 27, 2010 5:44 am    Post subject: Reply with quote

Yes but I think the draw will close on the cdrom as the system reboots and then boot from the cdrom.
Back to top
View user's profile Send private message
akbarstatx
n00b
n00b


Joined: 14 Oct 2002
Posts: 67
Location: Minneapolis, MN

PostPosted: Wed Jan 27, 2010 5:49 am    Post subject: Reply with quote

I thought I would give ejecting the cdrom a try, it didn't work, and the result is shown below

Code:

livecd ~ # umount /mnt/gentoo/boot/
livecd ~ # umount /mnt/gentoo/dev 
livecd ~ # umount /mnt/gentoo/proc/
livecd ~ # umount /mnt/gentoo     
livecd ~ # eject
umount: /mnt/cdrom: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
eject: unmount of `/mnt/cdrom' failed
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Wed Jan 27, 2010 6:31 am    Post subject: Reply with quote

Right. As long as you're booted from the CD it is busy. I hadn't thought of that.
Also you're probably right about the tray re-closing at reboot anyway.
Back to top
View user's profile Send private message
akbarstatx
n00b
n00b


Joined: 14 Oct 2002
Posts: 67
Location: Minneapolis, MN

PostPosted: Wed Jan 27, 2010 2:56 pm    Post subject: Reply with quote

I think a solution might be to use kexec but it doesn't seemed to be enabled in current minimal install iso for amd64 builds. Can anyone confirm this?
Back to top
View user's profile Send private message
RedSquirrel
Guru
Guru


Joined: 22 Apr 2008
Posts: 336

PostPosted: Thu Jan 28, 2010 2:53 am    Post subject: Reply with quote

I'm not sure about kexec, but you could try rebooting the machine with the CD, only this time using gentoo docache at the boot prompt.

From the Handbook here:

docache

  • This caches the entire runtime portion of the CD into RAM, which allows you to umount /mnt/cdrom and mount another CDROM. This option requires that you have at least twice as much available RAM as the size of the CD.


I haven't (so far) had the need to use this feature, but I just thought I'd mention it.

As you wrote above, it's possible that the CD drive will close when you reboot, but at least this way you can be sure. (I'm fairly certain the box I'm typing from leaves the tray open even upon reboot.)

The tricky part would be actually having the opportunity to type 'gentoo docache'. I haven't used an install CD for quite a while now. Does it stop at a boot prompt that lets you type kernel options, or is there a brief timeout followed by some default kernel booting? If it's the latter, obviously since you're typing blind, you wouldn't know when to type the kernel name and options. The Handbook gives me the impression that the install CD stops at a boot prompt so that you will be able to type whatever you want.


Edit: spelling
Back to top
View user's profile Send private message
RiouJ
n00b
n00b


Joined: 07 Jun 2010
Posts: 6
Location: Belgium

PostPosted: Mon Jan 30, 2017 8:19 am    Post subject: Reply with quote

I have a Quicksilver G4 with no hard way to eject the CD when the system is broken. I have a bootloader problem I tried to fix in so many ways without success but this is not the subject here. The gentoo minimal livecd is still in the tray. In the booting process, you can enter the kernel you want to boot with parameters if you want. The "nocache" parameter will add a step "Copying loop file for caching" that will let you eject the CD when you get the livecd prompt. Tested just now.
Back to top
View user's profile Send private message
C5ace
Guru
Guru


Joined: 23 Dec 2013
Posts: 350
Location: Brisbane, Australia

PostPosted: Mon Jan 30, 2017 9:18 am    Post subject: Re: Eject Install CD and reboot from HD remotely Reply with quote

akbarstatx wrote:
I am doing a remote install on a new box and I want to eject the install cdrom and have the system boot from the hard drive. Is this possible? If I could get ipmi working I could reset the boot order but I don't have that working until I boot the shiny new kernel. Note: opensolaris provides this type of functionality and I am pretty sure linux can do it I just don't know how.

Thanks


I do this:
1.) Set up the remote PC to boot from it's hard drive.
2.) Boot from the install CD by using F12.
3.) edit /etc/ssh/sshd_config to allow root login or use System Rescue CD.
4.) Connect your local PC via SSH.
5.) Do the installation.
6.) When done, exit the change root and give the 'reboot' command.

If the installation is OK., the remote PC will then boot from it's local hard drive.

Good Luck!
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