Which Linux version?
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: Which Linux version?
As long as you can get it installed with a development toolchain quickly, it doesn't matter too much which distro you use. I too would recommend Ubuntu for new users, although I use Gentoo myself.
Re: Which Linux version?
I'm gonna stick with Ubuntu. But I'm stucking at how to modify the floppy image: After compiling, I want to copy the kernel to the floppy image and test it. Is there any way to accomplish that? ( it's better be automatically. I mean after make is done, some kind of shell script is called to do all the things above)
"Programmers are tools for converting caffeine into code."
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Which Linux version?
losetup & mount.quanganht wrote:I'm gonna stick with Ubuntu. But I'm stucking at how to modify the floppy image: After compiling, I want to copy the kernel to the floppy image and test it. Is there any way to accomplish that? ( it's better be automatically. I mean after make is done, some kind of shell script is called to do all the things above)
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: Which Linux version?
You probably want to use the loopback filesystem. It lets you use a file as a virtual block device. You also probably want to use a preformatted floppy image with GRUB installed to start from. Try looking at JamesM's tutorials: http://www.jamesmolloy.co.uk/tutorial_html/index.html - he shows you make a setup like that, one which I still use.
Re: Which Linux version?
I tried loopback device but it's readonly, which is no good.
EDIT: ah. I forgot some nice scripts on JM's page...
EDIT: ah. I forgot some nice scripts on JM's page...
"Programmers are tools for converting caffeine into code."
- NickJohnson
- Member
- Posts: 1249
- Joined: Tue Mar 24, 2009 8:11 pm
- Location: Sunnyvale, California
Re: Which Linux version?
Loopback should allow you to write to the file... you may have to use root/sudo though.
Re: Which Linux version?
I can't setup loop0. Used loop1 instead but it is read-only.
"Programmers are tools for converting caffeine into code."
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Which Linux version?
What happens when you try loop0? Paste it. And the results of loop1.
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Which Linux version?
Also, there are literally hundreds of tutorials out there that will tell you how to mount a disk image using losetup. There's even tutorials that show how to mount partitions of disk images using losetup. There's even this article on the wiki. Googled and searched the wiki yet? I doubt it.
Re: Which Linux version?
If I didn't see that page, then how the hell i mounted my disk image???
"Programmers are tools for converting caffeine into code."
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Which Linux version?
Searched Google for something along the lines of "losetup read only" yet? The wiki link was only part of my post.
Re: Which Linux version?
I found the problem myself:
image_update.sh
It was because I forgot to add the file name needed to copy.
So, line 3 must be:
image_update.sh
Code: Select all
sudo losetup /dev/loop1 /home/quanganht/fd.img
sudo mount /dev/loop1 /mnt
sudo cp binary /mnt/boot
sudo umount /dev/loop1
sudo losetup -d /dev/loop1
So, line 3 must be:
Code: Select all
sudo cp binary/kernel.bin /mnt/boot
"Programmers are tools for converting caffeine into code."
-
- Member
- Posts: 34
- Joined: Sun Aug 03, 2008 5:38 am
Re: Which Linux version?
I find that Ubuntu, is not always the best beginner's distro, if you're a total newbie to the Linux concepts, but FreeSpire is more suitable, rather, though I use a form of Gentoo.
As for the losetup issue, just use "mount -o loop".
As for the losetup issue, just use "mount -o loop".
Re: Which Linux version?
Couldn't you just do the following?
Code: Select all
mount floppy.img -o loop /mnt
http://code.google.com/p/rmmtos/ - Real Mode MultiTasking Operating System