User Mode Linux

Well, I've built a 2.6.15 UML kernel package and I made a filesystem using archbootstrap... I've been wrestling with it for several hours now and I FINALLY have it booting... kind of!
I've had to boot into runlevel 1 and then run init 3 otherwise it hangs! and I also had to follow the "Automatically login some user to a virtual console on startup" to get round agetty being a pain!
Is anyone still playing with UML and does anyone have any similar horror stories (or fixes  ) to share..?[/url]

A really good place to go for UML stuf is www.netkit.org it's a set of scripts plus a kernel and debian filesystem for controlling UML instances. There's also a really good section of networking turorials, using a network you've built out of UML machines to teach.
What I'm trying to achieve is similar, but I want to build a GUI front-end in python, with drag and drop funtionality to build the network. I also want to be able to run as many as possible on my laptop (512Mb RAM which I may increase as I progress) so I'm trying for as small a footprint as possible with both the filesystem and memory requirements. This is something I haven't got much experience with so any pointers from people (perhaps from an emgedded background) would be helpful! I envisage this, when it's finished, as either a teaching tool for TCP/IP, and/or a tool for organisations to test network configurations as fast and cheeply as possible.
At the moment, the root file system is at 48M; as I mentioned before glibc has really bumped that up so I may look at an alternative clib for later versions. This is running on busybox for all of my executables so far and at the moment I'm using
pacman -Sd <package>
to install new packages and then
ldd <executable>
to find any other library files I need and copy them from the host machine.
Any ideas, points, mistakes, improvements, general abuse would be gratefuly recieved!  [/code]

Similar Messages

  • User Mode Linux -- Compiling problem

    Hi,
    I want to run the user mode linux for linux-2.6.17.6. When I try to compile the user mode linux I get this error:
    In file included from arch/um/include/os.h:13,
    from arch/um/drivers/fd.c:14:
    arch/um/include/kern_util.h:9:27: error: linux/threads.h: No such file or directory
    make[1]: *** [arch/um/drivers/fd.o] Error 1
    make: *** [arch/um/drivers] Error 2
    I was looking up a lot of time in google.
    My steps to compile it is:
    export ARCH=um
    make defconfig
    make
    If you have any suggestion, let me know.
    Bye.

    Using that option the kernel compiles smoothly. The problem here, is that I am not getting the kernel that I want. I am just building a normal kernel.
    Any suggestion, let me know
    Luis.

  • Start vm linux Guests in single-user mode

    Hi -
    I have OBIEE vm template installed and everything is OK, I forgot the roor password for this guest, (ovsroot) is not working I think I've changed it. One option is to start this guest in single-user mode, I tried but you can't see the console until the system is starting services which is a late phase to run linux single command on boot prompt. Please advice how can change my root password using single-user mode.
    thanks in advance
    Omar

    Omar M Sawalhah wrote:
    Sorry, but I am not sure I am getting this right, where should I add 'single console=xvc0', if you mean the guest, as I mentioned in my post I don't know the root password and I can't logon. please kindly if you can add more detailed steps.When you boot your guest using xm create -c vm.cfg, it will immediately connect you to the console of the guest. That will show you the GRUB boot menu. You then need to edit the kernel boot line exactly the same way you would a physical server. In order to boot into single-user mode, you need to add the parameter single to the boot line. Along with that parameter, you also need console=xvc0 so that the guest uses the connected console to show you the boot process and allows you access to the single-user shell. If you do not use this parameter, you'll need to determine the VNC port used by the guest and used VNC to connect to the console instead.

  • Data back up from Single User Mode

    Hello,
    I have a problem with my 700 MHz iBook, dual USB, with OS X 10.3.9.
    Unfortunately the OS doesn't start up because of "overlapped extent allocation" problem...
    I would like to re-install the complete OS but before doing it, I would like to back up some directories.
    Is it possible to save some data, by connecting an Ipod or some sort of external peripheral, from the Single User mode?
    If yes, how can I do it?
    Thank you in advance from your kind support.

    Before giving up the ghost check out these:
    http://docs.info.apple.com/article.html?artnum=25770.
    Manually fix Overlapped Extent Allocation Errors without Disk Warrior
    Overlapped overlapped extent allocation errors can be the bane of any Mac user's existence. Often, these errors go unnoticed until the problem becomes visible: your Mac might refuse to boot, crash unexpected, or worse, critical data might disappear from the Finder. Disk Utility can detect, but not fix overlapped extent allocation errors, and certain third-party utilities, such as Alsoft Diskwarrior, can fix them, but generally without reporting the consequences.
    Overlapped extent allocation error occur when the file system thinks that two files are occupying the same area on the hard disk, hence overlapping on the same "inode," which is the structure which holds the location of the data blocks the file occupies, and also file permissions and flags.
    Clearing the "overlapped" or "overallocated" extent allocation essentially means that you'll have to lose some data, because the only way to remove the overlap is to delete the file that's occupying the inode. So, if you suspect, or find out, that the guilty file is a critical system file that resides in one of the hidden system directories such as /etc /var /usr/ or visible system directories such as /System or /Library, and you don't want to reinstall the whole OS (which might not fix the overlapped extent allocation anyway), it's good to have another disk available to copy the files back to your original disk if necessary: a second bootable hard drive or a firewire drive connected to your Mac when you remove the misbehaving file. Just make sure that when you copy the file back to your boot disk that the permissions are correct, so it's best to use the "ditto" command, so that all sticky bits, flags, and permissions are preserved.
    In case you didn't know, you don't have to boot from an install CD in order to check for overlapped extent allocations. All you need to do is restart your Mac, while holding down command + S to boot in "single-user mode."
    At the command prompt that appears, type:
    $ fsck -fy
    If you have an overlapped extent allocation, you'll see:
    "Overlapped Extent Allocation" (File 123456d)
    No matter how many times you run fsck -fy, you'll never be rid of the error.
    So, simply issue the following command:
    find / -inum 123456 -print
    Note the "d" was dropped, or any extra letter that appears after the inode number.
    The find will return a file name that matches with the inode number, and the path to that file. If you remove the file then the fsck will not return this error next time you run it.
    However, before you can delete the file(s) in single-user mode, you'll need to mount the file system. Type:
    $ mount -uw /
    When done, issue the "sync" command, and that will flush the write cache so that all pending writes are written from memory to the disk. Also, since most OS X 10.3 Macs use the HFS+ Journaled file system, it might be a good idea to disable the journal before booting into single-user mode by typing:
    $ sudo diskutil disableJournal /
    then re-enable it when done fixing the overlapped extents and rebooting normally:
    $ sudo diskutil enableJournal /
    Chris Anderson is a long-time Linux propellerhead who just got his first Mac, an ibook G4, and can't keep his hands off of it. He currently works as a "The Architect" and general visionary for a maker of world-class collectibles.
    If you own Disk Warrior then it should be able to repair a drive with overlapped extents.
    There are two backup utilities included in Unix - psync and rsync. You will find them in the /usr/bin/ directory. For documentation simply enter: man psync or man rsync. In order to write data while in single-user mode you need to issue the command: /sbin/mount/ -uw / (Note: there is a "space" between the "uw" and the "/".) To mount an external drive you will need to provide the mountpoint for it in place of the "/", e.g., "/Volumes/volname") without the quotes.

  • Wipe a HD via Unix in Single User Mode?

    Is it possible to wipe a hard drive using diskutil or another method when booting up in Single User Mode? We routinely need to wipe drives and if possible, this would be the easiest.
    I suspect because the OS that boots in Single User Mode is on that same drive will make this impossible.
    Thanks in advance for your tips and comments,
    Doug

    Yes, you cannot erase an OS while it's 'hosting' the erasure. Single user mode is part of Mac OS X, so it's on the hard drive, not in the firmware or anything super-low-level like that. Oh well. So... you might be able to erase the vast majority of user, application, and even OS files, but it won't be complete and won't be 'as good as' a volume-format.
    A couple alternatives come to mind (sorry if you know all this. Not trying to be pedantic or patronizing, just making sure you know your options).
    We keep host computers around just for running wipes, backups, and diagnostics that cannot run from a drive holding the booted OS. You simply restart the to-be-wiped Mac holding the 't' key, connect it via firewire, and treat it as an external hard drive.
    You could also just boot from a Mac OS X install disc and wipe from the copy of Disk Utility included on the disc. Better yet, throw a +bona fide+ copy of OS X onto a pocket hard drive, boot the victim-Mac from that (hold option while it is first starting up), and wipe the internal HD normally, now that it's not in use. You could maybe even use single user mode in the booting OS, like you'd imagined, and format from there (I'm not sure that would be faster than letting it boot normally, though, as you might have to use "dd" or some other similar low-level wipe method, as I don't think the frameworks required for Apple's cli "diskutil" are available in single user mode).
    I haven't tried to use it on a Mac, but I have a 256 MB USB flash drive with, er, ['Darn' Small Linux|http://tinyurl.com/5md7t] on it for diagnosing Windows boxes. It runs a script on boot which, if you don't intervene to run utilities or what-have-you, will wipe all attached hard drives and shut down. I keep it locked up for understandable reasons, but its super useful just as a time-saver, booting most machines and beginning the countdown-to-wipe in under ten seconds.
    Anyway, let us know what your goals and thoughts are.
    Cheers, Joel

  • Getting Data Off Harddrive in Single User Mode

    When my PowerBook G4 running 10.3.9 boots after the white apple screen I just get a blue screen and my mouse. I am able to boot into single user mode and get to the data on my harddrive. My other computer at home is a linux box so if I could just get the network going in single user mode I could ssh all of my stuff to the other machine. Is there any way to do this. Is there any other good way to recover my data?

    Hi dsignoff,
       This is likely to be more difficult than it sounds. If the problem isn't a failed hard drive, you might have an easier time simply doing an archive-and-install. Of course any installation except a fresh install will preserve your home directory but an "update" installation stands a reasonable chance of not fixing the problem.
       Even if you do succeed in moving everything to the linux box, you will likely lose the resource forks and file metadata of the files.
       Of course even if you do try an archive-and-install, it never hurts to have some backup. I'm a bit rusty with Panther but I believe that it requires the following as a first step:
    /usr/libexec/registermach_bootstrapservers /etc/mach_init.d
    That actually starts quite a bit of the system, possibly including the part that is causing Aqua to fail to start up. (meaning that it too could fail) However, if the above command succeeds, the next step is to execute:
    /sbin/SystemStarter start Network
    You may also need:
    /sbin/SystemStarter start NetworkExtensions
    If all of that works, you should have enough services available to ssh to the Linux box and move files. Of course there is a chance that if you find the error messages of the process that is failing in the /var/log/system.log, we could actually recommend a fix for the system.
    Gary
    ~~~~
       "The wages of sin are death; but after they're
       done taking out taxes, it's just a tired feeling:"

  • J2ME WTK not connect to network in user mode

    Hi
    I am using Linux - Fedora, I have been using J2ME WTK in root user and then shifted to normal user account. After that I have installed the J2ME WTK in normal user mode.
    /home/tharindu
    it contains j2mewtk folder and WTK2.5.2 also installed under /tharindu folder. But still I need to shift to root user and run ktoolbar from command line shows following
    Loading simple Config module ...
    Creating backend ...
    Loading socket FrontEnd module ...
    Starting SCIM as daemon ...
    OTA server emulation started ...
    HTTPS server emulation started ...But when I run from normal user it only shows
    OTA server emulation started ...
    HTTPS server emulation started ...And also I can't connect to even localhost. How can I solve this. Please kindly help me.
    Thank you,
    Tharindu

    Given there is no way to know what your fiancée did to the system the best course of action is to re-install ML.
    Re-installing the OS will not touch your user data, only the system files will be restored.
    Before doing this it is a good idea to have a backup of the system.
    regards

  • Open fat hdd files in file manager..user mode

        Am able to open files from win HDD in root mode..
         Cannot open files in ...user mode...
       Please advise corrective action!!

          I have discovered that I can ....open in file manager...all of my linux hdd partitions of which there are six...in user mode!!  However, none of the windows hdd provide any ...open in file manager...response.  This indicates something amiss in the windows area.  The file manager runs correctly in ..root... but doesn't do so in user mode for opening windows hdd .
       The file manager runs in KDE using ..disc free access to all hdd's.
         I used the term....users... in fstab to enable all users.
        I don't have a clue for fixing this problem!!!!

  • MacBook Pro Software Update Results in Singlu-User Mode

    Hello,
    Since I have had problems before with Software update, I have decided to install one item at a time to find out which update packages cause problems.
    When I installed the latest "MacBook Pro Software Update", which is strongly recommended, I ended up getting stuck with the single-user mode and now I cannot get out. When I boot, I get a console instead of a Graphical User Interface. I am really tired of Tiger. I have used Linux for the past 9 years and found it to be excellent. I expected much more from Mac OS X when I first bought my system two weeks ago. I already did an "Archive and Reinstall" and I don't want to do it again.
    How can I go back to the usual GUI environment?
    Any help is greatly appreciated.
    K.
    Any help is greatly appreciated.
    K.

    Hello,
    Here is the solution to the problem. It is simply due to XCode installation. For some reason, one needs to perform the "MacBook Pro Software Update 1.0" after an "Archive + Install" before installing any other software.
    If Xcode is installed before the update, something gets messed and the computer keeps booting to a Console instead of the GUI.
    Hope this helps to others,
    K.

  • Terminology question: "booting as root" vs. "booting in single user mode"

    Terminology question: "booting as root" vs. "booting in single user mode".  Are these terms interchangeable, or is there a subtle or not-so-subtle difference?  (Obviously something I don't do often.)
    Thanks in advance.

    Boot to Single user allows root access.
    It isn't "booting to root" as in Linux, but I think is as close as it gets.
    You can enable root from a normal boot:
    http://www.youtube.com/watch?v=Y-JEpDi-cME
    Interesting read:
    http://www.securemac.com/macosxsingleuser.php
    This is fun:
    http://osxdaily.com/2007/01/22/what-happens-in-the-mac-os-x-boot-process/

  • Single user mode: Argument List is too long, PLEASE HELP

    Hey guys,
    I recently posted a topic asking if any1 knew how to delete all png files on the desktop,
    Nt many people replied,
    But anyway, I did some research and now I know how to do it,
    but in single user mode (cmd + S),
    When I typed in rm *.png
    While I ws on the desktop in single user mode,
    It came up saying Argument list too long,
    Does any1 know how to fix this,
    Plz reply ASAP,
    &amp; if possible addme on Skype mark.davidson19, it wld b extremely helpful

    If there are too many files expanded via the *.png wildcard, then the argument list length maximum can be exceeded.  The last time I checked, Mac OS X had a 256K line length limitation. (AIX was 1M, Linux 128K, Solaris 1M, Windows 8K (Cygwin env) - your mileage may vary with each operating system release).
    If you have too many files to expand on the command line, then you can delete them in batches.  There are several ways to do this
    cd ~/Desktop
    rm [a-m]*.png
    rm [n-z]*.png
    rm [A-M]*.png
    rm [N-Z]*.png
    Or finer increments.
    You could use something like
    find ~/Desktop  '*.png' -print0 -depth 1 | xargs -0 rm
    And you can also use
    find ~/Desktop '*.png' -depth 1 -delete
    This being a Unix environment, there are most likely a dozen additional ways to delete all the .png files and avoid command line length limits.
    As MrHoffman says, using rm and wildcards is a very dangerous thing to do unless you really REALLY know what you are doing.  If not, I strongly suggest having a recent full backup handy.  I actually suggest a backup regardless of how good you are in the Unix environment (I have multiple via different backup utilities preformed on a very regular basis;  years of experience has taught me you cannot be too careful with your data - it is worth far more than the cost of backup equipment).

  • Emergency user on Linux

    Hi,
    My Administrator user has been blocked on a Linux machine. Any idea for solution?
    Shraga.

    Hi Shraga,
    If you mean you Linux admin account is blocked then you can do the following.
    You may be able to boot single-user mode.
    If you are using GRUB, use the following steps to boot into single-user mode:
    1.If you have a GRUB password configured, type p and enter the password.
    2.Select Red Hat Linux with the version of the kernel that you wish to boot and type e for edit. You will be presented with a list of items in the configuration file for the title you just selected.
    3.Select the line that starts with kernel and type e to edit the line.
    4.Go to the end of the line and type single as a separate word (press the [Spacebar] and then type single). Press [Enter] to exit edit mode.
    5.Back at the GRUB screen, type b to boot into single user mode.
    If you are using LILO, specify one of these options at the LILO boot prompt (if you are using the graphical LILO, you must press [Ctrl]-[x] to exit the graphical screen and go to the boot: prompt):
    boot: linux single
    boot: linux emergency
    In single-user mode, you computer boots to runlevel 1. Your local filesystems will be mounted, but your network will not be activated. You will have a usable system maintenance shell.
    In emergency mode, you are booted into the most minimal environment possible. The root filesystem will be mounted read-only and almost nothing will be set up. The main advantage of emergency mode over linux single is that your init files are not loaded. If init is corrupted or not working, you can still mount filesystems to recover data that could be lost during a re-installation.
    good luck,
    Hay

  • Agetty fails to start after switching out of single user mode

    Every time I switch to runlevel 3 from single user mode, agetty fails with this error:
    Jan 29 10:19:28 localhost agetty[1445]: /dev/tty1: cannot open as standard input: Input/output error
    And since it fails, init disables it for 5 minutes… This always happens on the virtual console I run "init 3" on; the other consoles work fine.
    This is how I run agetty from /etc/inittab:
    c1:2345:respawn:/sbin/agetty -8 -s 38400 -a ma --noclear tty1 linux
    Disabling auto-login and removing the --noclear option does not make any difference. Does anyone have a clue what is going on? It is more of an inconvenience than a problem, but still… I am using early KMS on an ATI Radeon 9550 card, by the way.

    So nobody else has been bitten by this stupid bug?
    Anyway, it happens on a pure VGA console too, so it has nothing to do with the video driver. And I take back the “more of an inconvenience” part – it is freaking annoying that one can not just properly change the runlevel. Oh well…

  • How do i repair my hard drive in single user mode when disk is full?

    Hi there Apple Community!
    I have an old Macbook Pro 17" with an upgraded 500GB harddrive and 4GB memory. I'm running Mac OSX Lion.
    Was hoping you could help me out.  THis is the situation:
    Long story short I spilt wine on my macbook and the screen went a bit blobby. Switched it off for a few days, removed the battery etc. etc. Opened it up cleaned out as much of the wine as possible, but unfortunately some of it came in behind the LCD, so now the screen has a nice red stain.  Obviously I'm not going to try to clean that out of the LCD. 
    My Macbook Pro still worked for a few days after that, but then my harddrive gave up.  I booted in the Recovery HD menu, verified the drive and I got the error "Keys out of order - This disk needs to be repaired, click Repair Disk." I attempted to repair the disk but got the error "Keys out of order - Disk Full Error - The volume could not be repaired".
    Unfortnately of this 500GB I only have about 7GB free on it, as I have a huge iPhoto and iTunes library. I did make a TIme Machine backup of my user directory, but not the system files.  I don't really want to do a clean install because:
    1) I'm paranoid that there's something I did not fully back up
    2) I don't want to have to download the whole Mac OSX Lion again. I should have made a USB bootable backup when I had the chance.  I don't have access to a broadband connection.
    What I feel are my viable options, are as follows:
    1) I did buy a replacement internal 500GB harddrive, so I can probably try to make an image of the hard drive to this new drive, but not sure how. I believe it's through the Disk Utility with the "New Image" option but not sure how to go from there.
    2) Start up in Single User Mode and delete some unnecessary files and re-attempt to run the fschk -fy utility again (I tried this earlier and got the same Disk Full Error).  - the problem with this is, I'm not familiar with the command line and have no clue how to delete files.  I don't know my way around Unix.
    3) I can also probably attempt to make a Ghost Image or Acronis Image of the failed drive to this new drive, but not sure if Norton Ghost or Acronis True Image will be able to read this HFS drive - I believe it's possible as it's a simple hard drive clone. 
    If you can guide me in the best option - probably there is a better solution than my proposed ones above, I appreciate any feedback and comments you might have!

    hi Baltwo,
    So I ended up copying my user folder to another harddrive. I managed to download the whole osx lion again, reinstalled, and recovered my home folder using this discussion:
    http://support.apple.com/kb/HT1428
    I have managed to get all my files back. My iTunes library works fine, but my iPhoto library when I open it, get the following error:
    iPhoto cannot be opened because of a problem.
    Here's the error log
    Process:         iPhoto [1540]
    Path:            /Applications/iPhoto.app/Contents/MacOS/iPhoto
    Identifier:      com.apple.iPhoto
    Version:         8.1.2 (8.1.2)
    Build Info:      iPhotoProject-4240000~8
    Code Type:       X86 (Native)
    Parent Process:  launchd [209]
    Date/Time:       2012-09-19 19:56:45.528 +0200
    OS Version:      Mac OS X 10.7.4 (11E53)
    Report Version:  9
    Sleep/Wake UUID: 7948ABE2-5294-4F87-B6E3-777095A2F2EE
    Interval Since Last Report:          4780 sec
    Crashes Since Last Report:           9
    Per-App Crashes Since Last Report:   9
    Anonymous UUID:                      70117D38-03EA-4F9C-B810-50B743864B9E
    Crashed Thread:  0
    Exception Type:  EXC_BREAKPOINT (SIGTRAP)
    Exception Codes: 0x0000000000000002, 0x0000000000000000
    Application Specific Information:
    dyld: launch, loading dependent libraries
    Dyld Error Message:
      Library not loaded: /System/Library/PrivateFrameworks/iLifeSlideshow.framework/Versions/A/iLifeSlid eshow
      Referenced from: /Applications/iPhoto.app/Contents/MacOS/iPhoto
      Reason: image not found
    I've done an Apple Software Update but it didn't find an update for iPhoto.
    One thing to note is, this library was originally created on iLife 08, upgraded to '09 and it stayed on that version. It hasn't een upgraded to iLife '11.  It worked fine on my previous install of OSX Lion.  How do I recover the library without upgrading to '11 ?

  • How to Unlock root user in Linux version 4.4

    Hi All,
    Please let me know how to unlock root user as i tried to access with wrong password more than 3 times.
    Thanking you in advance

    Hi All,
    We tried to reset the root password in single user mode and tried to change the passas follows:
    we are getting error message as follows:
    sh -3.00#passwd root
    Changing password for the user root.
    New UNIX password:
    Retype New UNIX password:
    passwd: Authentication token manipulation error
    Please suggest how to change the root password in single user mode

Maybe you are looking for

  • I tried to update my iPhone 4s to the ios 6 and it wouldn't download and my phone will not work now.

    I tried to update my iPhone 4s to the ios 6 and it wouldn't download and my phone will not work.  I started the download and it said that it had 6 hours remaining, so i just left it overnight.  The next morning it was working fine, but the ios 6 didn

  • On change event

    Hi experts, Iam trying to display the data using itab(t_det) and it is having REVNR filed like this. AUFNR  RSNUM      REVNR 4006149|0043996297|11ATS9-8| 4006150|0043996338|11ATS9-8| 4006161|0043996297|11ATS9-9| 4006162|0043996338|11ATS9-10| If REVNR

  • Table of Contents Question

    Hello all - I'm brand new to the forums and relatively new to Frame, but I've been a tech writer for 10 years. I added a Chapter to a book, and it won't show up in my ToC.  I did not set up the original ToC, so I'm not sure why it sees the other Chap

  • Problem with embedded youtube links

    This is happening on my ipad and iphone after installing 7.0.2; when I click on an embedded youtube link it throws me to the home screen. I've deleted youtube app, no good. Reinstalled it, no good. Tried using various different browsers, no good. Any

  • Macbook pro Audio-in

    Can you use the audio-in on a macbook pro to record into Logic express? Or do i need an external audio box of some sort? I've been trying all kinds of different things to get audio to record inside of logic but nothing seems to be working. So can you