Hangs in parts.rc

From: Roger Johansson (no-email_at_home.se)
Date: 01/31/04


Date: Sat, 31 Jan 2004 02:22:00 +0100

I am a beginner in linux and I trying to get winlinux to work.

(Yes, I know that winlinux is lame, but with it I can use my usual tools
and text editors in win98 to study the files in winlinux and try to find
out what is happening. I have at least learned a lot about the boot up
sequence in linux while trying to find out why it doesn't work.)

I have unpacked and installed winlinux in D:\Linux, but it has not yet
unpacked its packages, I am still trying to pass the first boot-up.

The boot up hangs after the screen says:
Winlinux is setting up partitions _

I have localized the place where it hangs to rc.parts, and inserted lots of
echo statements to find out exactly where in rc.parts it hangs.

It is just after the line I have inserted that says
echo "rc.parts step8"
...

#!/bin/bash
#
#
echo "rc.parts start"
#load the modules, so we have the drives on /dev
[ -e /lib/modules/`uname -r`/kernel/drivers/scsi/sd_mod.o ] && modprobe
sd_mod
echo "rc.parts step 1"
[ -e /lib/modules/`uname -r`/kernel/drivers/ide/ide-disk.o ] && modprobe
ide-disk
echo "rc.parts step2"
#just make sure that /proc is configured
if ! grep "proc" /etc/fstab >/dev/null ; then
   echo -e "proc\t/proc\tproc\t0\t0" >>/etc/fstab
fi
echo "rc.parts step3"
#find the discs and configure them
for disc in `find /dev -name disc`
do
  partid=0
  fdisk -l $disc | grep "^/dev" |while read line
  do #avoid bash from expanding the fdisk's bootable partition mark
echo "rc.parts step4"
    if echo "$line" |grep "*" >/dev/null ; then
       line=`echo "$line" |tr "*" " "`
    fi
    part=`echo $line |cut -d" " -f1`
    type=`echo $line |cut -d" " -f6-`
echo "rc.parts step5"
    #if already configured, forget about...
    if ! grep "^$part" /etc/fstab >/dev/null 2>&1 ; then
       #check if it is the root device
       root=$(rdev |cut -d" " -f1)
echo "rc.parts step6"
       if [ "$root" == "$part" ] ; then
          mpoint="/"
echo "rc.parts step7"
       else
         #set the mount point
         mpoint="/mnt/part$partid"
echo "rc.parts step8"
         while [ -d "$mpoint" ]
         do
echo "loopcounter"
           mpoint="/mnt/part$(expr $partid + 1)"
echo "loopcounter2"
         done
echo "not so deep in loops"
         if ! echo "$type" | egrep "Extended|Ext'd" >/dev/null ; then
echo "deep in loops"
            mkdir "$mpoint"
         fi
       fi
       #check filesystem type
       if echo "$type" | egrep "DOS|Win95 FAT32|Win95 FAT16" > /dev/null ;
then
          if [ "$root" == "$part" ] ; then
             type="umsdos"
          else
             type="vfat"
echo "next loop"
          fi
       elif echo "$type" | grep "NTFS" > /dev/null ; then
          type="ntfs"
       elif echo "$type" | grep "Linux swap" > /dev/null ; then
          type="swap"
       elif echo "$type" | grep "Linux" > /dev/null ; then
          type="ext2"
       fi
echo "next loop2"
       if ! echo "$type" | egrep "Extended|Ext'd" >/dev/null ; then
          echo -e "$part\t$mpoint\t$type\tuser,auto,exec,suid\t0\t0" >>
/etc/fstab 2>/dev/null
       fi
    fi
echo "rc.parts near the end"
  done #while
done #for
...

The line it hangs on is this line
while [ -d "$mpoint" ]

I wonder what that line does, and how can it cause the execution to stop?
What does "set the mount point" mean?
Is it looking for a suitable partition to use?

I have placed winlinux on the second real partition of my first hard disk,
because it is the only partition where I have 4 GB free space it can use.
I know that in linux terminology that disk is called dev/hda5, or something
like that.
(The first partition of my second hd is hidden and used with bootmagic as
an second win98 C: disk I can choose at bootup.
So this D: disk is actually the E: disk if I do not use bootmagic and hide
one partition)
I use vfat32 on all 4 partitions on the two hard disks.

Here is my bootlog for this failed bootup

Jan 30 18:30:47 localhost date: Fri Jan 30 18:30:47 EST 2004
Jan 30 18:30:47 localhost rc.sysinit: Setting clock : Fri Jan 30 18:30:47
EST 2004 succeeded
Jan 30 18:30:47 localhost rc.sysinit: Activating swap partitions:
succeeded
Jan 30 18:30:47 localhost rc.sysinit: Setting hostname localhost:
succeeded
Jan 30 18:33:42 localhost rc.parts: rc.parts start
Jan 30 18:33:43 localhost rc.parts: rc.parts step 1
Jan 30 18:33:43 localhost rc.parts: rc.parts step2
Jan 30 18:33:43 localhost rc.parts: rc.parts step3
Jan 30 18:33:43 localhost rc.parts: rc.parts step4
Jan 30 18:33:43 localhost rc.parts: rc.parts step5
Jan 30 18:33:43 localhost rc.parts: rc.parts near the end
Jan 30 18:33:43 localhost rc.parts: rc.parts step4
Jan 30 18:33:43 localhost rc.parts: rc.parts step5
Jan 30 18:33:43 localhost rc.parts: rc.parts step6
Jan 30 18:33:43 localhost rc.parts: rc.parts step8
(here it hangs and I have to do ctrl-c and ctrl-alt-del to reboot)
Jan 30 18:36:01 localhost syslog: klogd shutdown succeeded

As you can see I waited a couple of minutes to see if something more would
happen before I rebooted.
How long can that statement line take to execute?
I have waited for much longer than this and nothing happens.

-- 
Roger J. (No Emails)


Relevant Pages

  • Booting problems
    ... I am a beginner in linux and I trying to get winlinux to work. ... echo statements to find out exactly where in rc.parts it hangs. ... Is it looking for a suitable partition to use? ... Jan 30 18:30:47 localhost rc.sysinit: Activating swap partitions: ...
    (alt.os.linux)
  • Home Made Restore Partition Menu
    ... I made my recovery partition even better by making a few extras ... boot into DOS and type EDIT. ... @echo off ... the very original Windows XP installation ...
    (microsoft.public.windowsxp.general)
  • Re: Ann: New FileSystem library for HPGCC
    ... can it still see a default partition as:3:? ... can you do the same for Cygwin vs. Windows -- ... $ echo hello> hello ...
    (comp.sys.hp48)
  • SUMMARY2: newfs on s2
    ... I needed a script that would set up a second disk with one partition ... echo "* Partition Tag Flags Sector Count Sector Mount ...
    (SunManagers)
  • Re: echo dos command problem
    ... but first entry added after localhost (not added in a new ... what I want is all three entries added to the host table in individual ... echo 10.190.10.10 server1.test.com>> ...
    (microsoft.public.scripting.wsh)