How to automatically mount ext3 partition at boot-up?
How to automatically mount ext3 partition at boot-up?
Hello all, I am running Puppy Linux 1.08r1 on Toshiba Portege 3440 laptop. Puppy Linux is being started from MS-DOS 7.1 (~Win98) using grub4dos (with all apps & settings stored in C:\PUP001). I also have an ext3 partition containing my document files.
How can I make Puppy Linux automatically mount the ext3 partition during boot-up? I tried to add mount command into ~/.xinitrc, but it did not work. Thank you very much in advance for any help.
How can I make Puppy Linux automatically mount the ext3 partition during boot-up? I tried to add mount command into ~/.xinitrc, but it did not work. Thank you very much in advance for any help.
First: You should add the mount command to the /etc/rc.d/rc.local file. The difference with the .xinitrc is that the rc.local executes when you bootup puppy while .xinitrc only executes when the X graphical environment starts.
Second: Where are you creating your mount point? When puppy runs in Ram, only /root is persistent. Any mount point that you create under /mnt will go away after you reboot.
If you still want to mount under /mnt, You will have to create the mountpoint at every boot before trying to mount the filesystem by adding the following to rc.local
I would recommend to create a folder called "data" under /root and mount your other filesystem there, then you don't need to create the mountpoint every time.
The main advantage is that you will need less clicks to go to your data there as most applications 'file open' dialog opens in /root.
Second: Where are you creating your mount point? When puppy runs in Ram, only /root is persistent. Any mount point that you create under /mnt will go away after you reboot.
If you still want to mount under /mnt, You will have to create the mountpoint at every boot before trying to mount the filesystem by adding the following to rc.local
Code: Select all
mkdir /mnt/<yourmountpoint>
mount /dev<yourdevice> /mnt/<yourmountpoint>
for example
mkdir /mnt/data
mount /dev/hda3 /mnt/data
The main advantage is that you will need less clicks to go to your data there as most applications 'file open' dialog opens in /root.
Last edited by rarsa on Wed 26 Apr 2006, 17:21, edited 1 time in total.
[url]http://rarsa.blogspot.com[/url] Covering my eclectic thoughts
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
[url]http://www.kwlug.org/blog/48[/url] Covering my Linux How-to
The partitions also should be unmounted at shutdown.
Tool:
http://www.murga.org/~puppy/viewtopic.php?t=3140
Mark
Tool:
http://www.murga.org/~puppy/viewtopic.php?t=3140
Mark
This GUI app. mounts: FAT32, FAT16, EXT2, EXT3 & NTFS partitions at boot.
- Attachments
-
- xbootmount.gz
- extract & put it in /usr/sbin, & drag to desktop to make link & choose an icon.
- (1.16 KiB) Downloaded 361 times
- Sit Heel Speak
- Posts: 2595
- Joined: Fri 31 Mar 2006, 03:22
- Location: downwind
-
- Posts: 59
- Joined: Thu 09 Mar 2006, 17:53
- Location: UK
Puppy initially just ran it RAM from CD, you just could save to /root.
Later, suppport for /usr was added using unionfs.
Normally, Puppy runs from CD, so all folders are write-protected!
Very simple explanation
Puppy2 uses a newer version of unionfs, that allows to make all writeprotected folders "writable".
Mark
Later, suppport for /usr was added using unionfs.
Normally, Puppy runs from CD, so all folders are write-protected!
Very simple explanation
Puppy2 uses a newer version of unionfs, that allows to make all writeprotected folders "writable".
Mark
-
- Posts: 59
- Joined: Thu 09 Mar 2006, 17:53
- Location: UK
Simple, for sure; except that it doesn't seem to fit the facts. I can edit /etc/profile and the changes survive a reboot, yet /etc/fstab gets overwritten.
/etc is of course a symlink to /root/.etc, so changed files are stored in the pupfile. Using explore2fs on a backup of my pupfile I can see both fstab and profile with the same owner and access rights. So the only explanation I can come up with is that Puppy overwites fstab each time it boots up.
Unless I'm missing something obvious, of course...
Pete
/etc is of course a symlink to /root/.etc, so changed files are stored in the pupfile. Using explore2fs on a backup of my pupfile I can see both fstab and profile with the same owner and access rights. So the only explanation I can come up with is that Puppy overwites fstab each time it boots up.
Unless I'm missing something obvious, of course...
Pete
Let me modify this statement: Puppy ignores fstab at boot. But 'mount -a' and umount -a' work like in any other distro.sunburnt wrote:... Puppy doesn't use fstab at all.
So I suppose if you complete fstab and place 'mount -a' to rc.local it will mount all drives from fstab.
Yes, it does. I checked it on my hd2 type installed system.
I recognized that my existing swap partition also remains 'off' after boot process even /etc/swappartition1 was correct.
So I put another line to rc.local file: 'swapon /dev/hda5' where hda5 is my swappartition. (maybe an expert could do better solution, e.g. editing rc.sysinit-hd file)
After reboot all wanted partition were mounted and swap was switched on.
Again: it is a full hd installed system! Live cd switches on swappartition if find one.
eMeRy; Yes you can use fstab if you want, but Puppy doesn't use it.
Editing fstab is tricky for noobs, that's why I made the xbootmount GUI utility, to make it easy to do.
The only thing it won't do is mount the swap, I'd fix that but I'm writing a new utility that'll mount partitions, files, & Samba shares.
Swap partitions & files will also be listed for mounting with the GUI utility.
Unlike MUT which mounts immedately & xbootmount which mounts them at boot, the new one will do both.
Editing fstab is tricky for noobs, that's why I made the xbootmount GUI utility, to make it easy to do.
The only thing it won't do is mount the swap, I'd fix that but I'm writing a new utility that'll mount partitions, files, & Samba shares.
Swap partitions & files will also be listed for mounting with the GUI utility.
Unlike MUT which mounts immedately & xbootmount which mounts them at boot, the new one will do both.
if you set up fstab, Rox uses the information to allow you to mount/unmount partitions with one click
Rox 2.4.1 is even easier than Rox 1.2 ... if you click the mount point, it will automatically mount the drive, and automatically unmount it when you close the Rox window ... the cd drive should already be set up in fstab, just click /mnt/cdrom to automatically mount a cd (it will even automatically close the cd tray if it is open)
Rox 2.4.1 is even easier than Rox 1.2 ... if you click the mount point, it will automatically mount the drive, and automatically unmount it when you close the Rox window ... the cd drive should already be set up in fstab, just click /mnt/cdrom to automatically mount a cd (it will even automatically close the cd tray if it is open)
if there is a device name and a mount point listed in fstab, Rox should be able to mount/unmount itwhere is the list of partitions to choose from?
the appropiate mount points should have been created first, of course
the cd drive should already be setup in fstab ... for Rox 2.4.1, you just have to click the cdrom folder in a Rox window showing /mnt, to mount the cd and show you the files on the cd ... it will even close the tray automatically if the tray is open ... closing the Rox window will unmount the cd
for Rox 1.2, i think you have to hold the shift key or something when you click the folder, to mount it
i think there are mount/unmount options in the right click menus for both versions of Rox
i'm not sure about how hard drive partitions work, exactly ... i think it's pretty much the same way, it's been a while since i tried it
-
- Posts: 59
- Joined: Thu 09 Mar 2006, 17:53
- Location: UK
An interesting and erudite discussion! However nobody has commented on the point I attempted to make. With my hd1 type installation, changes I make to fstab don't survive a reboot (Puppy 1.0.. This is despite the fact that I can successfully change other files in the same directory.
It seems as if Puppy treats fstab differently depending on whether you have a type 1 or type 2 installation, overwriting it each boot for a type 1 install.
Pete
It seems as if Puppy treats fstab differently depending on whether you have a type 1 or type 2 installation, overwriting it each boot for a type 1 install.
Pete
pythoncoder; The modules.conf file's over written also, as I found, probably a few others as well.
I beleave Barry said in another post that Puppy 108 (& 109 I assume) doesn't wipe modules.conf, don't know about fstab.
Only solution I see is to somehow auto. make a backup at shutdown & restore it in rc.local at startup.
I beleave Barry said in another post that Puppy 108 (& 109 I assume) doesn't wipe modules.conf, don't know about fstab.
Only solution I see is to somehow auto. make a backup at shutdown & restore it in rc.local at startup.
Sorry pythoncoder, my situation is different from yours.
As I recognized case of 'common' puppy install, gurus use to save the base files to a safe directory (that surely saved before shutdown) than during reboot they copy back to its proper place.
So if I were you, I should modify the fstab than save it to for example to root directory than during boot copy it back to /root/.etc folder, to its original place and issue an 'mount -a'. Proper file for this the rc.local in /root/.etc/rc.d/ directory.
Its only hint, I haven'tried but hope it helps.
eMeRy
As I recognized case of 'common' puppy install, gurus use to save the base files to a safe directory (that surely saved before shutdown) than during reboot they copy back to its proper place.
So if I were you, I should modify the fstab than save it to for example to root directory than during boot copy it back to /root/.etc folder, to its original place and issue an 'mount -a'. Proper file for this the rc.local in /root/.etc/rc.d/ directory.
Its only hint, I haven'tried but hope it helps.
eMeRy