PDA

View Full Version : [Help] Write on poor man's install?



victoria
08-21-2006, 04:36 PM
Hi, I have a poor man's install (compressed on HDD, just like the livecd) with grub bootloader instead of isolinux.
Is there a way to modify and permanently save the grub.lst while I'm running my knoppix system?
The location seen from another system where I hooked My HDD is /media/hdd1/boot/grub/grub.lst. When I'm running from my knoppix HDD, It will be /cdrom/boot/grub/grub.lst but because the system is read-only, I can't save on it. How could I make r/w temporarly that location?
Any help much apreciated.
V.

ockham23
08-21-2006, 05:45 PM
Do you mean "menu.lst"? What do you want to achieve? Edit grub boot menu and/or add cheat codes to default kernel options?

victoria
08-21-2006, 07:12 PM
Do you mean "menu.lst"?

Yes that's it, my bad...


What do you want to achieve? Edit grub boot menu and/or add cheat codes to default kernel options?

Something like that, but a more general goal is to be able to save files in that area. Let say, beside boot directory to create my own directory where to be able to permanently save files.
I don't know if I can/how remount that portion of "CD" as read/write.

ockham23
08-21-2006, 08:26 PM
You can customize Knoppix by creating a persistent home directory on your hard drive and even modify the cd image file with unionfs by storing your modifications in a special unionrw directory on your hard drive.

Editing menu.lst, however, isn't that simple if grub itself and menu list are located inside the image file. You would have to copy the files from the cd to a temporary directory, edit menu.lst according to your needs, and create a new iso file from the copied files with mkisofs.

victoria
08-21-2006, 09:24 PM
You can customize Knoppix by creating a persistent home directory on your hard drive ... [snip]

Can be instead of persistent home directory just another generic directory? I could use some links to point in that direction and use it to store whatever I need... Would it be writeable out of UNIONFS?
Thanks, V.

ockham23
08-21-2006, 09:51 PM
I just reread your initial post. Apparently, menu.lst is located in a folder that is not part of the image file. So you should be able to edit to contents of the file if you boot off the Knoppix cd instead off the image file.

And, yes, you can store your data in any directory on your computer's hard drive or on any removable drive unless the file system of the drive is NTFS. File systems with write support are - among others - FAT32, FAT16, ext2, ext3 and reiserfs. Before you can write to the drive you have to tell Knoppix to mount the drive. In this regard, a persistent home directory is more convenient because it is mounted automatically when Knoppix starts.

Unionfs is not required if you only want to store user data to permanent folder on a hard drive or a removable drive. However, you cannot add new programs to Knoppix without using unionfs.

victoria
08-21-2006, 10:11 PM
I just reread your initial post. Apparently, menu.lst is located in a folder that is not part of the image file. So you should be able to edit to contents of the file if you boot off the Knoppix cd instead off the image file.

And, yes, you can store your data in any directory on your computer's hard drive or on any removable drive unless the file system of the drive is NTFS. File systems with write support are - among others - FAT32, FAT16, ext2, ext3 and reiserfs. Before you can write to the drive you have to tell Knoppix to mount the drive. In this regard, a persistent home directory is more convenient because it is mounted automatically when Knoppix starts.

Unionfs is not required if you only want to store user data to permanent folder on a hard drive or a removable drive. However, you cannot add new programs to Knoppix without using unionfs.

Thanks for the answers, I think I need to re-state what I'd like to accomplish:

- without any external help (knoppix CD, or other linux), just within my knoppix-like HDD install...
- without any other partition/disk intended for storage...

... just the same way I have the "boot" directory, I whish to have another writeable directory used just for read-write-save files. The purpose is to use this install on a compact flash, without abusing the write cycles which would compromise the CF. I won't mind to make/run a script to "remount -rw" or "remount -ro" this directory.
Having for this purpose another partition seems logic and trivial. But I wonder if I just could use the same partition for this, even the way of doing it is not trivial. In the end, I could protect under the "ro umbrela" also my "special directory"

ockham23
08-21-2006, 10:35 PM
Having for this purpose another partition seems logic and trivial.
Well, there's your answer.

Jacky
08-22-2006, 05:40 AM
If I understand correctly, you want to mount r/w the partition where your iso image is.

When you boot from a iso image on disk (as in your poor man's install), the partition where the iso is will be mounted as a cdrom loop device in read-only mode. For example, if the iso file was on hdd1, then mount will read "hdd1 on cdrom2.loop type ext3 (ro)".

To make hdd1 writable, issue the following mount command:

mount /dev/hdd1 /cdrom2.loop -o remount

Regards.

victoria
08-22-2006, 07:40 PM
To make hdd1 writable, issue the following mount command:

mount /dev/hdd1 /cdrom2.loop -o remount



Works like a charm!
Thanks to all for their suggestions.
Have a great day, V.

johnrw
10-07-2006, 09:17 PM
If I understand correctly, you want to mount r/w the partition where your iso image is.

When you boot from a iso image on disk (as in your poor man's install), the partition where the iso is will be mounted as a cdrom loop device in read-only mode. For example, if the iso file was on hdd1, then mount will read "hdd1 on cdrom2.loop type ext3 (ro)".

To make hdd1 writable, issue the following mount command:

mount /dev/hdd1 /cdrom2.loop -o remount

Regards.

huh?
It gives me an error.

sudo mount /dev/hda1 /media/hda1 -t ntfs -o remount,rw
Error opening partition device : Device or resource busy
Failed to startup volume : Device or resource busy
Couldn't mount device '/dev/hda1' : Device or resource busy

with cdrom2.loop
it says it is not in mtab
but it is there as /cdrom2.loop/KNOPPIX/knoppix.iso /cdrom/ iso9660 ro,loop=/dev/loop0 0 0

This thing is really starting to bug me...
I know Knoppix can write to the drive if I boot using the cd.
hda1 is ntfs...

best,
john

Jacky
10-08-2006, 02:54 AM
Sorry, johnnyrw, but it does not seem like you are in the same situation as victoria, so the advice to her may not work for you.

What exactly is your situation, what were you trying to do when you got your errors and problems?

johnrw
10-08-2006, 07:21 AM
Hi Jacky,

I want to mount r/w the partition where my iso image is.

That partition is hda1, it is ntfs. I am using grub4dos to boot up via the boot.ini, and using gilles ruymbeke's minirt_usb6.gz
Works great. Except I can't find any way to modify any files on hda1 (ntfs.)

Grub4dos's menu.lst is there for instance, and rebooting into windows xp just to make a small change in a text file...that is outside of the iso.

Jacky
10-08-2006, 01:45 PM
I'm sorry, but I don't have any experience loading from iso on an NTFS partition so I can't advise. My only suggestion would be that you should note NTFS write capability in Knoppix is still experimental. Certainly the driver included in the CD contains limitations and is not up to date. Therefore perhaps you should consider creating a fat32 partition and put your iso there.

johnrw
10-08-2006, 03:57 PM
Jacky,

Thank you for trying. The DVD is too big for the fat32 filesystem. I realize the write support is minimal. But at the same time, I think it can handle editing of a file which already exists. I have been running knoppix on ntfs, via the DVD image file in C:\KNOPPIX\knoppix.iso. It must be reading ntfs ok, because it runs reliable enough.

best,
john