Programming :: Startup Script Unable To Mount A Partition?
Apr 14, 2010
Is there a way I can run myProgram when desktop appears no matter if root , administrator, desktop user or an unprivileged user logs in? I actually developed a script which I set to run at startup i.e. when the Desktop appears. Script runs finely but can't mount a partition. In the script I mounted a partition using
sudo mount /dev/sda1 /mnt &> result.txt
After executing script a file named result.txt was created which contained
sudo: no tty present and no askpass program specified
In other words the mounting failed. If I run the script myself from the terminal using sudo ./myProgram i don't face this problem and the drive gets mounted successfully.
This is strange. I moved OS 11.1 from an old 150 GB PATA drive over to a 500 GB SATA using Parted Magic. The old and new partitions were
Code: OLD: /dev/sda1 - 19.99 GB, mounted as / (root partition) /dev/sda2 - 97.82 GB, mounted as /home /dev/sdb1 - 29.52 GB, Windows XP NEW: /dev/sda1 - 29.30 GB, mounted as / /dev/sda2 -292.97 GB, mounted as /home /dev/sda3 - 45.82 GB, Windows XP
I used the "Clonezilla" tool on the Parted Magic live CD to move and resize the partitions. To my delight, everything appeared to transfer just fine. I can boot into OpenSUSE 11.1 (though not into Windows, but that's not really important; I'll figure that out later), but my /home partition won't mount. I'm set to autologin, and I get the expected error: "can't access /home/stephen" (or something like that). Here's the weird thing. I can ALT-F3, get a terminal and manually "mount /dev/sda2 /home", go back to ATL-F7 and log right in, so I know the disk is fine. (I've already 'fsck'd everything, by the way, and they're clean.)
I've used Yast's partitioner about a dozen times, trying "device by ID" and other settings. I always get the same thing when I reboot. On this last reboot, when it refused to log into /home, I ALT-F3'd, logged in as root, did a "cat" on "/etc/fstab" and entered the device-by-id line exactly as I saw it there and it mounted the /home directory just fine! ALT-F7, logged into KDE. I'm typing this in KDE now. Works fine. I so rarely need to reboot this machine that I can manually mount the /home partition, if need be, but (obviously) I'd like it to be mounted automatically during the boot.
I don't see anything obviously wrong here. The fact that I can take that second line and do a manual "mount" shows me that the device ID is at least correct. Just to be clear, here's what I entered in virtual terminal 3 as root to get my home partition to mount: Code: mount /dev/disk/by-id/ata-Hitachi_HDP725050GLA360_GEA534RV0DJ4LA-part2 /home and it worked fine. Exact same line.
I had to re-install Windows XP because the install was running slow.So, I created another partition using GParted for my personal data and moved my files there and re-installed Windows XP.Now, the Windows partition won't mount automatically.NTFS Configuration Tool shows 0.0GB. So, I have to open up a Terminal window, and issue sudo mount /dev/sda1 /media/Windows and everything is fine.
my "places menu" references folders on a second partion, where I store all my personal files (ntfs, as I use it also from Windows). After boot those folders wouldn't show in Thunar. Some other programs, as Fontmatrix, wouldn't find databases stored there, what messes them up. Thunderbird has problems to recognize profiles etc.What is strange, the partition seems to be mounted at startup as I can see and select it from Thunar. Also, it appears on Desktop. After selecting the partition, closing and reopening Thunar everything works fine, places would show correctly and Fontmatrix database is ok
I was dual-booting Ubuntu (10.10) and Windows 7. I installed Backtrack in addition to these 2, and the Ubuntu GRUB was replaced with the one from Backtrack.
Now when I boot, only Backtrack and Windows 7 are listed in GRUB. When I run fdisk from Backtrack, I see all partitions, and running a Partition Manager lists the Ubuntu partition as a Linux partition. However, the partition manager says that it is unable to read the contents of the partition, and that it is unable to re-read the partition table.
Also, the Ubuntu, Backtrack, and Linux Swap partition are all listed under the same Extended partition.
Still a novice in Ubuntu (Karmic Koala). I'm trying to mount an ext4 20GB partition of my hard drive so that i can use it to store data, i want it to appear on my desktop as well as on places, as far as i know this is achieved by mounting the partition in /media. At my first attempt i used the following commands. (i named the partition ondskapt)
Code: sudo mkdir /ondskapt sudo gedit /etc/fstab in this document i added the following at the end: /dev/sda4 /ondskapt ext4 defauts 0 0
I am unable to mount partition in ubuntu 10.04. Icons for different partitions are not coming within "Places". Every time I have to manually mount the partition or CD or DVD and manually unmount it. Seldom it shows the partition icons within Places>Computer. Then the partitions are getting mounted upon double clicking its partition-icon. But I fail to unmount the partition as it throws the error "media/partition_name is not in the fstab (and you are not root)."
Ubuntu has been complaining about swap not being ready during boot. The swap partition was showing up un-known in gparted. I booted off CD, reformatted it to swap. Error message gone but system monitor > resources shows my swap size to be 86GB (the exact size of my shared NTFS volume). gparted shows the swap partition as not 'swapped on' I am running Ubuntu 11.04 along side Windows 7 (as well as my factory restore partition) and an NTFS shared partition.My partition structure in order of location on disc.
sda1-2 Windows 7 sda4, extended partition --sda6 Ubuntu
I am running the latest debian lenny OS and with kernel 2.6.26-2-686. I have a common /data partition for both Ubuntu and Debian which is ext4 file system. I am not able to mount this volume. The error message reads "unknown filesystem type ext4". How do I fix this. I searched the net and there was a link talking about this
Upon trying to boot Windows I got through the GRUB startup selections and then i get stuck at a black screen displaying "Starting Up. . ." That would be no problem, I just boot ubuntu instead and mount the partition to access the programs I'm looking for. Now I get an interesting error message:
"Error mounting: mount exited with exit code 13: ntfs_mst_post_read_fixup: magic: 0x00150000 size: 4096 usa_ofs: 0 usa_count: 1040: Invalid argument Actual VCN (0x15000011d92501) of index buffer is different from expected VCN (0x1). Failed to mount '/dev/sda1': Input/output error NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows then reboot into Windows twice. The usage of the /f parameter is very important! If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more details."
I would run chkdsk in windows if I could, but that's my problem in the first place.
had a dual O/S win Vista 64bit & unbuntu 9.10 64bit.
1. Had a virus on my Win vista side, anti virus could help (virus kept replicating itself - to halt all progs from running). 2. In the End Win Vista would start & was only used Unbuntu for about 2 days. 3. Tried to repair Win Vista, but noting worked. 4. Couldn't mount Win partition through unbuntu either - needed to copy some files across. 5. Eventually formatted Win partition side & re-installed Win Vista 64bit. 6. The problem now is that the grub option to select the O/S choice isn't there, thus i can't use Linux. 6b. The computer loads only Win vista 64bit (Like there usn't a Linux) 7.Checked at the disk management prog - could see my linux space but have no access. 8. Used a live Linux cd to access linux partition, just to check - it worked. 9. how can i acccess the Linux O/S as normal?
I have a 4gb SDHC card that has been partitioned with an ext2, linux swap, and fat 32 partition that I use in an Android phone. After I partitioned it this way, which I have done more than once with no problems, it quit mounting or being recognized by Android, Linux, or Windows. Windows can tell there is something there but can't mount it, Debian and Android just say it's not there. I need to try to fix the partition table which gparted told me was corrupt the last time gparted could see it.
I have 500GB external HDD. I have to mount it my CenOS -4.8 Machine.(kernel-188.8.131.52EL 32-bit) . External HDD partitions are ntfs file system partition. I have tried to mount ntfs partition in linux . But it's not done.
I Am Having Problem With My JFS Partition On Which Ubuntu Is Installed. It Is Not Mounting. The Bootscreen Says There Is Serious Problem With Mounting The Partition And It Does Not Load Linux. I Tried jfs_fsck -p and -a But With No Success. I Also Tried Checking For Errors Using GParted. The Logscreen Said logredo failed and unrecoverable error reading M from /dev/sda5/ CANNOT CONTINUE. Is There Any Way I Can Repair This Or Atleast Get My Data Back?
I am struggling with getting an sshfs mount mounted on system boot. I have a script that mounts the sshfs for "userA". When userA runs the script all is well - user A can access the remote filesystem, root user can't see it as expected. The basic command is: sshfs userA@remote host:/home/userA /home/userA/mountdir -p 21212 -o password_stdin < passwordfile. I can prepend the sshfs command in the script with su - userA -c and when I run this script logged in as root all is well, userA has access and all is well. If I then put this script in /etc/init.d and reference it properly in the rc. directories the mount doesn't happen. If I prepend the sshfs command with sudo, same thing. Logged in as root I can run the script and UserA has access. Run the script in /etc/init.d during startup and the mount doesn't happen. Echoing text to a log file shows that the script is being executed but no mount happens.
what now trying to mount partition get this error this is the partition ubuntu 9.10 is installed on and upon reboot error no device with a long string. mount: can't find /dev/sda6/mnt in /etc/fstab or /etc/mtab
so now that I believe I've successfully mounted the partition how do I direct the bootloader to this partition /dev/sda6 on /media/11076e45-e27d-470b-bb6d-6894f7809a0c type ext4 (rw,nosuid,nodev,uhelper=devkit)
I've just bought a HP mini compaq laptop. The laptop doesn't have any CD/DVD "reader". So i was forced to download the .iso file to install ubuntu in addition to Windows XP that was present when i bought it. To do so i used UNetbootin, and i used my only hard disk as a live CD. But when i wanted to install ubuntu, they told me to create a partition. The problem is that i can't. I have only one partition sda1(nfst) which covers the whole stockage memory, and an empty space(8Mo). I can't acceed to any of the resizing or modifying options to edit the nfst partition. The only options are manage flags and umount. When i click on this one, they tell me : # umount /cdrom : cdrom is busy.
I am running the latest suse release downloaded directly from their website. I ran the installation after buring the dvd and everything seemed to be working fine. after the installation i ran updates and used it for a little bit. When i shut it down that night and went to restart it I got an error that stated the OS wasnt there. I then went through the installation and everything and it retained the information from the installation before (web history etc.) but for some reason every time I reboot or shut it down the system is not able to read the startup information from the hard drive and will not come on without me re installing it.
I have a Dell Inspiron 1720 running Ubuntu v10.04 with a wireless card.My desktop is a Dell Optiflex running WinXP.The desktop is connected via ethernet cable to a Linksys wireless router. Certain folders on the desktop are set for sharing. Up until early last week I was able to access the desktop folders from the laptop with no issues.Suddenly I am now getting this error "Unable to mount location Failed to mount Windows share" whenever I try to access the desktop folders from the laptop.I suspect an upgrade is the culprit, but not sure.