Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

init-script to start uml's??

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
mariourk
l33t
l33t
User avatar
Posts: 807
Joined: Fri Jul 11, 2003 8:48 am
Location: Urk, Netherlands

init-script to start uml's??

  • Quote

Post by mariourk » Fri Feb 11, 2005 11:55 am

I'm experimenting with uml's for some time now. What I still can't do is starting the uml's
in a nice way. I would prefer an init-script like any other service. (/etc/init.d/...)
Does some know where I could find such a script? I found a script here
but that doesn't work right. The uml does start but I can't access it with ssh or screen.
Also the stop fuction doesn't work :?
I also would like to run things as a regular user and not as root.

I hope someone can help me out here, it would really help me a lot! :D
If there is one thing to learn from history, it's that we usualy don't learn anything from it, at all.
Top
TheSmallOne
Guru
Guru
User avatar
Posts: 467
Joined: Sat Jan 22, 2005 6:13 pm
Location: Germany

  • Quote

Post by TheSmallOne » Sat Feb 12, 2005 2:14 am

-–- deleted -–-
Last edited by TheSmallOne on Thu Dec 20, 2012 3:34 pm, edited 3 times in total.
Top
mariourk
l33t
l33t
User avatar
Posts: 807
Joined: Fri Jul 11, 2003 8:48 am
Location: Urk, Netherlands

  • Quote

Post by mariourk » Mon Feb 14, 2005 8:51 am

Code: Select all

Leviathan home # /etc/init.d/uml start
/sbin/runscript.sh: /var/lib/init.d/uml-11403: line 89: syntax error near unexpected token `}'
/sbin/runscript.sh: /var/lib/init.d/uml-11403: line 89: `}'
 * ERROR:  "/etc/init.d/uml" has syntax errors in it; not executing...
I copy-pasted /etc/init.d/uml 1:1, so no changes there. I edited /etc/conf.d/uml like this:

Code: Select all

# TUN/TAP devices specified here will be persistent
tapdevices="tap12 tappes"

# The user to which a device should belong
device_tap12_user="root"
device_tappes_user="uml"


# Names of the UML machines we want to start
umls="uml1 umlb"

# Required info for the UMLs
uml_uml1_kernel="/home/uml/ftpserver"
uml_uml1_rootfs="/home/uml/RootFS"

uml_umlb_kernel="/home/uml2/webserver"
uml_umlb_rootfs="/home/uml2/RootFS"

# Optional Parameters
uml_uml1_info="UML FTP server"
uml_uml1_user="uml"           # Username under which the UML should run
uml_uml1_mem="128M"           # Amount of memory for the uml
uml_uml1_netconf="eth0=tuntap,tap1"
uml_uml1_disks="ubd1=/home/uml/SwapFS"
uml_uml1_consoles="con0=fd:0,fd:1 con=pts"
#uml_uml1_opts=""

# Optional Parameters
uml_umlb_info="A description for the UML"
uml_umlb_user="uml"           # Username under which the UML should run
uml_umlb_mem="128M"           # Amount of memory for the uml
uml_umlb_netconf="eth0=tuntap,tap2"
uml_umlb_disks="ubd1=/home/uml2/SwapFS"
uml_umlb_consoles="con0=fd:0,fd:1 con=pts"
#uml_umlb_opts=""
Any idea why I get this error? :?
If there is one thing to learn from history, it's that we usualy don't learn anything from it, at all.
Top
TheSmallOne
Guru
Guru
User avatar
Posts: 467
Joined: Sat Jan 22, 2005 6:13 pm
Location: Germany

  • Quote

Post by TheSmallOne » Mon Feb 14, 2005 9:50 am

-–- deleted -–-
Last edited by TheSmallOne on Thu Dec 20, 2012 3:33 pm, edited 1 time in total.
Top
mariourk
l33t
l33t
User avatar
Posts: 807
Joined: Fri Jul 11, 2003 8:48 am
Location: Urk, Netherlands

  • Quote

Post by mariourk » Mon Feb 14, 2005 10:29 am

This time it works a lot better :D
Still something goes wrong with the tap-devices. They are not created.
Stopping the uml's gives an error but they are stopped (killed maybe???)

Code: Select all


Leviathan root # /etc/init.d/uml stop
 * Stopping UML UML FTP server (uml1)...                     [ ok ] 
* Stopping UML A description for the UML (umlb)...                  [ ok ]
 * Stopping UML  (umlftp)...
 *  UML doesn't exist                           [ !! ]
If there is one thing to learn from history, it's that we usualy don't learn anything from it, at all.
Top
TheSmallOne
Guru
Guru
User avatar
Posts: 467
Joined: Sat Jan 22, 2005 6:13 pm
Location: Germany

  • Quote

Post by TheSmallOne » Mon Feb 14, 2005 11:52 am

-–- deleted -–-
Last edited by TheSmallOne on Thu Dec 20, 2012 3:33 pm, edited 1 time in total.
Top
mariourk
l33t
l33t
User avatar
Posts: 807
Joined: Fri Jul 11, 2003 8:48 am
Location: Urk, Netherlands

  • Quote

Post by mariourk » Mon Feb 14, 2005 1:44 pm

It seems the tapdevice is indeed created but not started:

Code: Select all

Leviathan init.d # cat /proc/net/dev
Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed multicast|bytes    packets errs drop fifo colls carrier compressed
  eth0: 1251218    5912    0    0    0     0          0         0   677134    6196    0    0    0     0       0          0
    lo:     176       2    0    0    0     0          0         0      176       2    0    0    0     0       0          0
dummy0:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
  tap0:       0       0    0    0    0     0          0         0        0       0    0    5    0     0       0          0
  tap1:       0       0    0    0    0     0          0         0        0       0    0    0    0     0       0          0
I can start tap0 with /etc/init.d/net.tap0, this doesn't happen automaticly.
tap0 has IP 192.168.0.1

Code: Select all

/etc/conf.d/net:
iface_tap0="192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0"
The uml should have 192.168.0.12 but this device is not up.
When I acces an uml with screen, this is what I get:

Code: Select all

uml1 root # /etc/init.d/net.eth0 restart
 * Bringing eth0 up (192.168.0.12)...SIOCSIFFLAGS: Permission denied [ !! ]
Hope this can be fixed.
I have the feeling it will :D
If there is one thing to learn from history, it's that we usualy don't learn anything from it, at all.
Top
TheSmallOne
Guru
Guru
User avatar
Posts: 467
Joined: Sat Jan 22, 2005 6:13 pm
Location: Germany

  • Quote

Post by TheSmallOne » Mon Feb 14, 2005 4:30 pm

-–- deleted -–-
Last edited by TheSmallOne on Thu Dec 20, 2012 3:33 pm, edited 1 time in total.
Top
slick
Bodhisattva
Bodhisattva
User avatar
Posts: 3495
Joined: Sun Apr 20, 2003 11:44 am

  • Quote

Post by slick » Tue Feb 15, 2005 9:38 am

From http://forums.gentoo.org/viewtopic-t-234393.html

Here are the comments (date: 02/15/05) to this script in (my bad) english:
I will update this if the orginal comments will changed

-----

$USER is the user who running the uml (i want start it as root)

$NICE can use if you want

$REMOTE_IP is not use in the script, is for information only and should set in the uml

$CONSOLE is set to "null", i want see the boot, i can later access the uml with the following command

Code: Select all

screen `sudo -H -u $USER /usr/bin/uml_mconsole $UMID config con1 | cut -d ":" -f 2` 
All $MAC must begin with "fe:fd" to set it up (my experience)

To stop the uml is use the "cad" command from uml_mconsole. To use this you must edit the /etc/inittab inside the uml

replace: ca:12345:ctrlaltdel:/sbin/shutdown -r now
with: ca:12345:ctrlaltdel:/sbin/halt

The script dont work if your /tmp is mountet with noexec. I dont know why.

-----
Top
Post Reply

9 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic