LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   unable to seek on /dev/loop0 (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-seek-on-dev-loop0-841582/)

ankit_justdoit 10-31-2010 05:59 PM

unable to seek on /dev/loop0
 
Hello,

Whenever i execute command fdisk /dev/loop0 < file1
(file1 contains the commands used for fdisk),I get an error saying "unable to seek on /dev/loop0".The last line of file1 contains w in order to write the partition table back to the disc.

How should I exit the command prompt safely (after saving all the settings)

Below are the contents of the file



filef.sh:

fdisk /dev/loop0 < filee
fdisk /dev/loop0 < file1


filee:
x
s
8
h
16
c
1024
r
d
n
p
1

512
t
b
p
w



file1:
x
c
1024
r
n
e
2


n
l

700
n
l

900
n
l


t
5
fd
t
6
fd
t
7
fd
p
w

Samotnik 10-31-2010 06:29 PM

You should execute fdisk on your actual device file (or regular file, which contains partition). Loopfile contains nothing by itself.

ankit_justdoit 11-01-2010 06:40 AM

Thanks a lot..it worked but the message "syncing disks" is displayed at the end of executing and it is not giving me back the command prompt.what additional command do i need to put in file1 to terminate safely to my command prompt..??


All times are GMT -5. The time now is 05:12 PM.