LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-16-2009, 03:37 PM   #1
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,229

Rep: Reputation: 173Reputation: 173
running linux in dosbox


i have no clue how to do it because dosbox does not emulate an IDE controller and i dont know how to boot linux from a ramdisk
it stops booting at the mounting filesystem -- is there anyway to have root-in-ram just to see if i could get to bash?
 
Old 10-16-2009, 04:09 PM   #2
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Dosbox is a dos environment to enable you to run DOS games and programs. Linux does not use DOS. Just use a Virtual Machine.
 
Old 10-16-2009, 04:11 PM   #3
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,229

Original Poster
Rep: Reputation: 173Reputation: 173
i am doing it because i can not because i want to use it as a guest os
 
Old 10-16-2009, 04:17 PM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
You say you're doing it because you can, but you don't know how to do it? Linux will not run in DOS or dosbox. This is why the Linux install makes you reformat the partition or drive to a non FAT16/32 or NTFS drive - Linux is not designed to rn in DOS.
 
Old 10-16-2009, 04:29 PM   #5
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
Essentially that is what initrd (initial ram disk) is all about. The kernel creates a ramdisk and loads a root filesystem from the contents of an initrd file. Initrd files are created using cpio and gzip. You can extract one and then modify its contents. You'll see an init script in there written using nash. See man initrd or nash for specifics. I'm sure someone has written a howto out there on the net somewhere.

----
Bill
 
Old 10-16-2009, 04:34 PM   #6
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
Another thing I just remembered from the early days. You'll like this XavierP. Check out Monkey Linux. Monkey Linux is a minimal Linux ELF distribution in a 7.5 MB archive (5 diskettes) Monkey Linux can be extracted to the DOS filesystem (to the FAT32 too). This is pretty old stuff so it might not work with your hardware though.

----
Bill

Last edited by wmakowski; 10-16-2009 at 04:47 PM.
 
Old 10-16-2009, 06:06 PM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Dosbox is not an entire OS though. It's not even DOS so running anything other than DOS programs would be problematic at least. Monkey does look cool, thanks for that. I can't see the point of running Linux within a DOS emulator though. Surely a VM would be a far more useful learning tool?
 
Old 10-16-2009, 07:13 PM   #8
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,229

Original Poster
Rep: Reputation: 173Reputation: 173
basically the question is how do i use a ram disk as the root
 
Old 10-17-2009, 07:27 PM   #9
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,229

Original Poster
Rep: Reputation: 173Reputation: 173
still wondering how do i use a ram disk as root
 
Old 10-17-2009, 07:47 PM   #10
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,345

Rep: Reputation: 184Reputation: 184
add this to the kernel line: ramdisk_size=166500 root=/dev/ram0
 
Old 10-17-2009, 08:03 PM   #11
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,229

Original Poster
Rep: Reputation: 173Reputation: 173
i get
Kernel Panic: VFS: Unable to mount root fs on 01:00
 
Old 10-19-2009, 10:18 AM   #12
wmakowski
Member
 
Registered: Oct 2003
Location: Ohio
Distribution: Fedora 18, 19, RHL 5.2
Posts: 546

Rep: Reputation: 43
I don't know if what you are doing is possible, but you might want to re-read post #5. Especially the part about initrd and nash. When the kernel loads the last thing it does is execute init. init is the mother of all processes. init is a script within your initrd image. What normally happens at the end of init is that it will try to switchroot from ram to a physical device. Once it has root loaded it will continue starting up all the processes/services for that particular runlevel. You'll need to modify init so it stays in your initial ram disk. If you want to execute anything you'll also need to add those items to the filesystem in initrd. There might be a way to do that after, but I've never tried it.
 
Old 10-26-2009, 03:46 AM   #13
inclusivedisjunction
LQ Newbie
 
Registered: May 2008
Posts: 8

Rep: Reputation: 0
Hi smeezekitty. If you're wondering, I've already tried a couple distros with ramdisks. They all crash DOSBox as soon as they try to launch init. My guess is they throw an exception that crashes the machine; maybe the FPU emulation is borked? You might want to try enabling 387 emulation if the kernel you use supports it (add no387 to the kernel parameters).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dosbox - trapped focus in dosbox window. hamster Linux - Software 7 11-11-2007 05:56 PM
running windows 95 with dosbox frenchn00b Linux - General 2 09-20-2007 03:08 PM
error running DOSBOX sycamorex Linux - Software 2 09-01-2007 04:33 PM
Dosbox v0.60 under Linux hamster Linux - Software 2 11-02-2003 09:58 AM


All times are GMT -5. The time now is 03:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration