Run unmount automatically at startup
Run unmount automatically at startup
I need to unmount a device and a file after puppy boots. There must be a file that will run commands after puppy boots, but I can't find it.
Background info if you are interested.
I have two SATA drives in my PC, made room at the end of the second drive using GPart and formatted them to ext2 and linux-swap ( made the swap 2 gigs even though I have 2 gigs of memory cause 4 gigs wouldn't work). Made the ext2 format bootable
I did a full install of Puppy to that ext2 partition and ran GRUB. to the partition and to a floppy - not to the MBR.
I booted windows and ran a program called bootpart. This created a file of the boot sector for linux and placed a call to it in the boot-ini file that windows uses to dual boot.
This works great. I get to choose at boot time which OS I want to run. If I choose Linux, it passes control to GRUB which then asks me again...will have to look more at that for workarounds... and then Puppy runs.
the problem is that after booting, I cannot mount the windows drive becuase the drive device and the boot sector file are already mounted.
So I would like to unmount them as soon as puppy boots.
Background info if you are interested.
I have two SATA drives in my PC, made room at the end of the second drive using GPart and formatted them to ext2 and linux-swap ( made the swap 2 gigs even though I have 2 gigs of memory cause 4 gigs wouldn't work). Made the ext2 format bootable
I did a full install of Puppy to that ext2 partition and ran GRUB. to the partition and to a floppy - not to the MBR.
I booted windows and ran a program called bootpart. This created a file of the boot sector for linux and placed a call to it in the boot-ini file that windows uses to dual boot.
This works great. I get to choose at boot time which OS I want to run. If I choose Linux, it passes control to GRUB which then asks me again...will have to look more at that for workarounds... and then Puppy runs.
the problem is that after booting, I cannot mount the windows drive becuase the drive device and the boot sector file are already mounted.
So I would like to unmount them as soon as puppy boots.
This sounds odd. First of all, in Linux-speak, you don't mount a drive. You mount a partition. Where exactly is Windows located? And what version of Puppy are you using?
Once Windows has passed control to GRUB, there would be no reason for Puppy to be mounting the Windows partition.
What happens when you try to mount the Windows partition? How do you know that it is already mounted?
Once Windows has passed control to GRUB, there would be no reason for Puppy to be mounting the Windows partition.
What happens when you try to mount the Windows partition? How do you know that it is already mounted?
rcrsn51 wrote:This sounds odd. First of all, in Linux-speak, you don't mount a drive. You mount a partition. Where exactly is Windows located? And what version of Puppy are you using?
Windows is on the first hard drive on the first primary partition - "C:"
Pppy version is 3.01
I checked the mounted folder and the partition that is windows is mounted and the only file that shows is the boot sector file that is called by NTLDR. So maybe GRUB keeps that boot sector file mounted and because that file is on the windows partition, the partition cannot then be "remounted"Once Windows has passed control to GRUB, there would be no reason for Puppy to be mounting the Windows partition.
Using Pmount, I get an error message - I don't have it to paste right now - that says the fusemount reports that mountpoint is already occupied and that the native ntfs driver is opening the device in read only mode. - the message is in red.What happens when you try to mount the Windows partition? How do you know that it is already mounted?
After playing with that scenario a few times, I umounted the device that is the windows partition and unmount the boot sector file within it. After that, Pmount works fine and all is well.
So I thought I would try to autounmount the device during the linux boot process
UPDATE
Well, I did the unthinkable and changed two variables at once. I used the unmount command as Trapster suggested and that appeared to solve the problem. But I also commented out sections of the GRUB menu,lst file.rcrsn51 wrote:Just out of curiosity, could you post the menu.lst file that boots Puppy? It will be in the /boot/grub folder at the root of your Linux partition.
I tried to recreate the problem by not running the "autorun commands" and unmounting at boot, but the issue has not reappeared. It was not a one time thing as it happened about 5 times. I had even booted to windows and done a chkdsk at bootup to no avail.
The file is attached. It used to point to every partition that was ntfs as well as the primary. I commented out the extended partitions. Do you think that may have been causing it?
UPDATE - file quoted here
# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'. Sun May 4 22:04:01 2008
#
# Start GRUB global section
#timeout 30
color light-gray/blue black/light-gray
# End GRUB global section
# Other bootable partition config begins
title Windows (on /dev/sda1)
rootnoverify (hd0,0)
makeactive
chainloader +1
# Other bootable partition config ends
# Linux bootable partition config begins
title Linux (on /dev/sdb2)
root (hd1,1)
kernel /boot/vmlinuz root=/dev/sdb2 ro vga=normal
# Linux bootable partition config ends
# Other bootable partition config begins
# title Windows (on /dev/sdb5)
# map (hd0) (hd1)
# map (hd1) (hd0)
# map (hd0,0) (hd1,4)
# map (hd1,4) (hd0,0)
# rootnoverify (hd1,4)
# makeactive
# chainloader +1
# Other bootable partition config ends
# Other bootable partition config begins
# title Windows (on /dev/sdb6)
# map (hd0) (hd1)
# map (hd1) (hd0)
# map (hd0,0) (hd1,5)
# map (hd1,5) (hd0,0)
# rootnoverify (hd1,5)
# makeactive
# chainloader +1
# Other bootable partition config ends
title Install GRUB to floppy disk (on /dev/fd0)
pause Insert a formatted floppy disk and press enter.
root (hd1,1)
setup (fd0)
pause Press enter to continue.
title Install GRUB to Linux partition (on /dev/sdb2)
root (hd1,1)
setup (hd1,1)
pause Press enter to continue.
title - For help press 'c', then type: 'help'
root (hd0)
title - For usage examples, type: 'cat /boot/grub/usage.txt'
root (hd0)
Last edited by dbmix on Mon 05 May 2008, 21:09, edited 1 time in total.
Can SMBMount be run in this startup folder???
I am able to mount drives from the cl using smbmount, but when I try to put those commands into the rc.local file, it is a no go.
thinking that SAMBA not initialized at that point or something. Is there a place to put SAMBA commands to run automatically at start-up??
UPDATE:
Apparently at this point in the startup, Puppy is still waiting for the DHCP to respond
Thanks
thinking that SAMBA not initialized at that point or something. Is there a place to put SAMBA commands to run automatically at start-up??
UPDATE:
Apparently at this point in the startup, Puppy is still waiting for the DHCP to respond
Thanks
...............That worked great - thanks to all!GeoW wrote:Oddly enough, although Pup 3.01 has no Startup folder, if you create
one it will be used correctly. Note capital S - /root/Startup - if you put
links to your scripts into this folder, they will be run when X starts.
GeoW
EDIT
If I rem correctly it was Lobster who told me this to solve my problem.