PCLinuxOS-Forums
News: ...FLASH!!! ...New PCLinuxOS Testing board now open. Register today! Be an active contributor to the PCLinuxOS future! ... Read all about it now, on THIS forum!!!..
 
*
Welcome, Guest. Please login or register. May 27, 2012, 10:23:13 AM


Login with username, password and session length


Pages: [1] 2   Go Down
  Print  
Author Topic: startup problem (grub,fstab,mkintrd: SOLVED).  (Read 1102 times)
yeshe
Sr. Member
****
Offline Offline

Posts: 273


Forest sangha


« on: February 16, 2011, 04:19:08 AM »

I've got a wierd startup-problem.

I had three HD-disks and one DVD in the following order:
pri master - Maxtor - Windows XP
pri slave - WD - PCLOS 2009
sec master - DVD
sec slave - Seagate - PCLos2010

In the Grub menu I had entries to all three OS'es but the PCLos2009 disk crashed, and I removed it.

After that I have changed in the grub menu and deleted that entry. But I might have done something else as well, because there are problems booting both the Windows and the remaining PCLOS OS.

Starting Windows problem:

If I start windows directly from BIOS it works well. But not from Grub: This is the message I get after choosing "windows" at the grub-menu:
Code:
  root (hd1,0)
filesystem unknown. partition type 0x7
   map (0x82) (0x80)
   map (0x80) (0x82)
   makeactive
   chainloader +1

ett diskfel uppstod. (transl. a disk error occured)
Press ctrl+alt+del for reboot.

And if I choose Linux from the Grub menu , it starts up correctly, but I have to wait one minute extra during boot because
Code:
...
loading IDE generic module...
waiting for sdc5 to appear
waiting for sda1 to appear
(timeout 1 minute)


Windows XP partition appears in PCLinuxOS as sda1 and root "/" appears as sdb5. I don't know why the system looks for sdc5 and I don't know why it doesn't find sda1?

Configuration:

/boot/grub/device.map:
Code:
(hd0) /dev/sda
(hd1) /dev/sdb
/boot/grub/menu.lst:
Code:
timeout 10
color black/cyan yellow/cyan
gfxmenu (hd0,4)/boot/gfxmenu
default 0

title linux
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux root=UUID=38388736-15b8-49f7-9b0b-5312b58d8c50 resume=UUID=4b9da18a-3aa8-4f04-9bce-469e9961a4bb splash=silent vga=788
initrd (hd0,4)/boot/initrd.img


title linux-nonfb
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=UUID=38388736-15b8-49f7-9b0b-5312b58d8c50 resume=UUID=4b9da18a-3aa8-4f04-9bce-469e9961a4bb
initrd (hd0,4)/boot/initrd.img

title failsafe
kernel (hd0,4)/boot/vmlinuz BOOT_IMAGE=failsafe root=UUID=38388736-15b8-49f7-9b0b-5312b58d8c50 failsafe
initrd (hd0,4)/boot/initrd.img


title windows
root (hd1,0)
map (0x82) (0x80)
map (0x80) (0x82)
makeactive
chainloader +1

/etc/fstab
Code:
# Entry for /dev/sdb5 : Linux root
UUID=38388736-15b8-49f7-9b0b-5312b58d8c50 / ext4 relatime 1 1
none /dev/pts devpts defaults 0 0
# Entry for /dev/sdb6 : Linux home
UUID=640f76b5-5c72-4dee-a2b6-5eb9b1409ce5 /home ext4 relatime 1 2
# Entry for /dev/sda1 : Win XP
UUID=B074BA0574B9CDFA /mnt/winXP ntfs-3g user,umask=000 0 0
# Entry for /dev/sda5 : windata
UUID=51FDE27748FF62D3 /mnt/windata ntfs-3g user,umask=000 0 0
# Entry for /dev/sda6 : data
UUID=4c5380f7-e164-461a-b3f2-a161512422e4 /mnt/data ext3 user 1 2
none /proc proc defaults 0 0
# Entry for /dev/sdc1 : media?
#UUID=4b9da18a-3aa8-4f04-9bce-469e9961a4bb swap swap defaults 0 0
Logged
Ramchu
Hero Member
*****
Offline Offline

Posts: 1429



« Reply #1 on: February 16, 2011, 07:04:51 AM »

Sounds like you need to use your PCLinux Live CD and redo MBR

Do a search form the forum home page for redo MBR
Logged

yeshe
Sr. Member
****
Offline Offline

Posts: 273


Forest sangha


« Reply #2 on: February 16, 2011, 08:31:46 AM »

I have used the Redo_MBR from the actual PCLOS installation, but I don't know what to change in the textfile, and when I choose "reset bootloader" nothing changes. Perhaps it works better using the CD?
Logged
TerryN
PCLinuxOS Tester
Sr. Member
*******
Online Online

Posts: 267


Rock the Box!


« Reply #3 on: February 16, 2011, 10:15:32 AM »

I think you'll find the answer here http://www.pclinuxos.com/forum/index.php/topic,74051.msg654087.html#msg654087
Logged

Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI  graphics
PCLinuxOS 2012 (KDE)
|Twitter|
yeshe
Sr. Member
****
Offline Offline

Posts: 273


Forest sangha


« Reply #4 on: February 16, 2011, 10:52:38 AM »

Gosh.. that was too complicated to me  Cry
"run mkinitrd" sounds simple, but I don't know which options to use (if any) and if it can destroy even more if I do it wrong... som I am a little confused.. I don't know what a ramdisk image is or when it is used and what function it has...
Logged
Old-Polack
Administrator
Hero Member
*****
Online Online

Posts: 9695


----IOFLU----


« Reply #5 on: February 16, 2011, 11:50:59 AM »

yeshe:

One thing at a time. You now have only two hard drives, yet your grub Windows stanza is trying to map the third drive as the first drive. Can't be done if it isn't there. Try;

title Windows
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
makeactive
chainloader +1

Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
yeshe
Sr. Member
****
Offline Offline

Posts: 273


Forest sangha


« Reply #6 on: February 16, 2011, 02:41:34 PM »

Thanks Old Polak - that solved the problem with the Windows boot.
I still have the one minute delay when I boot Linux.
Logged
yeshe
Sr. Member
****
Offline Offline

Posts: 273


Forest sangha


« Reply #7 on: February 16, 2011, 02:55:20 PM »

Perhaps I can try this?
Quote
I found that to stop the 60 second wait, is to redo the initrd files as follows:

in /boot
delete or rename the initrd file corresponding to the kernel you are running and then

mkinitrd /boot/initrd-2.6.33.4-pclos1.pae.img 2.6.33.4-pclos1.pae

Note: you have to do this as root, and change the kernel numbers to the one you are running.
I am running the 2.6.33.4 pae kernel.

This has not had any adverse effects on my machine other than to get rid of the delays, that I am
aware of.
Quote
Oh crud, I knew I forgot something.

First you have to find out what the new UUID's are, do this with blkid command at a console.
Then you have to update your /boot/grub/menu.lst AND /etc/fstab to reflect those new
UUID's and THEN do the mkinitrd to incorporate them into the initrd img's.

But using LABELs is much better. Get away from those dern UUID's.

Logged
Old-Polack
Administrator
Hero Member
*****
Online Online

Posts: 9695


----IOFLU----


« Reply #8 on: February 16, 2011, 03:01:10 PM »

Thanks Old Polak - that solved the problem with the Windows boot.
I still have the one minute delay when I boot Linux.

First we need to see the results of the following commands;

[root@localhost ~]# blkid             <Enter>

[root@localhost ~]# fdisk -l -u=cylinders            <Enter>
Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
yeshe
Sr. Member
****
Offline Offline

Posts: 273


Forest sangha


« Reply #9 on: February 16, 2011, 04:51:35 PM »

Code:
[root@localhost ~]# blkid
/dev/sda1: LABEL="WINDOWS" UUID="B074BA0574B9CDFA" TYPE="ntfs"
/dev/sda5: LABEL="WINDATA" UUID="51FDE27748FF62D3" TYPE="ntfs"
/dev/sda6: LABEL="data" UUID="4c5380f7-e164-461a-b3f2-a161512422e4" TYPE="ext3"
/dev/sdb1: UUID="4b9da18a-3aa8-4f04-9bce-469e9961a4bb" TYPE="swap"
/dev/sdb5: UUID="38388736-15b8-49f7-9b0b-5312b58d8c50" TYPE="ext4"
/dev/sdb6: UUID="640f76b5-5c72-4dee-a2b6-5eb9b1409ce5" TYPE="ext4"
Code:
[root@localhost ~]# fdisk -l -u=cylinders

Disk /dev/sda: 122,9 GB, 122942324736 byte
240 huvuden, 63 sektorer/spår, 15881 cylindrar
Enheter = cylindrar av 15120 · 512 = 7741440 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Diskidentifierare: 0x95029502

    Enhet Start     Början        Slut     Block    Id  System
/dev/sda1   *           1        3386    25598128+   7  HPFS/NTFS
/dev/sda2            3387       15881    94462200    5  Utökad
/dev/sda5            3387        7768    33127888+   7  HPFS/NTFS
/dev/sda6            7769       15881    61334248+  83  Linux

Disk /dev/sdb: 160,0 GB, 160041885696 byte
240 huvuden, 63 sektorer/spår, 20673 cylindrar
Enheter = cylindrar av 15120 · 512 = 7741440 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Diskidentifierare: 0x1549f232

    Enhet Start     Början        Slut     Block    Id  System
/dev/sdb1   *           1         289     2184808+  82  Linux växling / Solaris
/dev/sdb2             290       20673   154103040    5  Utökad
/dev/sdb5             290        3193    21954208+  83  Linux
/dev/sdb6            3194       20673   132148768+  83  Linux
How can I start console as root if I am logged in as a ordinary user?

Now it's time for me to go to bed. I'll come back tomorrow!
Logged
Aradalf
Sr. Member
****
Offline Offline

Posts: 485


« Reply #10 on: February 16, 2011, 05:18:19 PM »

How can I start console as root if I am logged in as a ordinary user?

Type
Code:
su
at a terminal then enter your root password.
Logged

Old-Polack
Administrator
Hero Member
*****
Online Online

Posts: 9695


----IOFLU----


« Reply #11 on: February 16, 2011, 05:56:49 PM »

Code:
[root@localhost ~]# blkid
/dev/sda1: LABEL="WINDOWS" UUID="B074BA0574B9CDFA" TYPE="ntfs"
/dev/sda5: LABEL="WINDATA" UUID="51FDE27748FF62D3" TYPE="ntfs"
/dev/sda6: LABEL="data" UUID="4c5380f7-e164-461a-b3f2-a161512422e4" TYPE="ext3"
/dev/sdb1: UUID="4b9da18a-3aa8-4f04-9bce-469e9961a4bb" TYPE="swap"
/dev/sdb5: UUID="38388736-15b8-49f7-9b0b-5312b58d8c50" TYPE="ext4"
/dev/sdb6: UUID="640f76b5-5c72-4dee-a2b6-5eb9b1409ce5" TYPE="ext4"
Code:
[root@localhost ~]# fdisk -l -u=cylinders

Disk /dev/sda: 122,9 GB, 122942324736 byte
240 huvuden, 63 sektorer/spår, 15881 cylindrar
Enheter = cylindrar av 15120 · 512 = 7741440 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Diskidentifierare: 0x95029502

    Enhet Start     Början        Slut     Block    Id  System
/dev/sda1   *           1        3386    25598128+   7  HPFS/NTFS
/dev/sda2            3387       15881    94462200    5  Utökad
/dev/sda5            3387        7768    33127888+   7  HPFS/NTFS
/dev/sda6            7769       15881    61334248+  83  Linux

Disk /dev/sdb: 160,0 GB, 160041885696 byte
240 huvuden, 63 sektorer/spår, 20673 cylindrar
Enheter = cylindrar av 15120 · 512 = 7741440 byte
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Diskidentifierare: 0x1549f232

    Enhet Start     Början        Slut     Block    Id  System
/dev/sdb1   *           1         289     2184808+  82  Linux växling / Solaris
/dev/sdb2             290       20673   154103040    5  Utökad
/dev/sdb5             290        3193    21954208+  83  Linux
/dev/sdb6            3194       20673   132148768+  83  Linux
How can I start console as root if I am logged in as a ordinary user?

Now it's time for me to go to bed. I'll come back tomorrow!

If you wish to use shorter, meaningful, labels  rather than UUID numbers to identify your partitions, now would be the time to create them for your partitions on /dev/sdb. You can do this with the command

[root@localhost ~]# tune2fs -L <label name> /dev/<whatever>              <Enter>

Do not try to label the extended partition, as it's only a container. Label the logical partitions within the container

To label a swap partition, one must first turn off swap, reformat with the label, then turn swap back on, using the label to verify its proper creation.

[root@localhost ~]# swapoff -a                     <Enter>

[root@localhost ~]# mkswap -L <label name> /dev/sdb1                   <Enter>

[root@localhost ~]# swapon LABEL=<label name>         <Enter>

[root@localhost ~]# swapon -s                             <Enter>

If you do this, the new labels will show up when the blkid command is given again.

Once the labels are created and verified, /boot/grub/menu.lst can be edited so each stanza takes this form.

title MiniMe 2010
kernel (hd0,13)/boot/vmlinuz BOOT_IMAGE=MiniMe_2010 root=LABEL=minime2010 resume=LABEL=swap1000 vga=791
initrd (hd0,13)/boot/initrd.img


You would, of course, use your own labels.

Editing /etc/fstab takes this form;
Code:
# Entry for /dev/sdc14 :
LABEL=minime2010        /                       ext4    defaults,noatime                1 1
LABEL=TR5-Documents     /home/polack/Documents  ext3    rw,user,noauto,exec,noatime     0 0
LABEL=Documents2        /home/polack/Documents2 ext3    rw,user,noauto,exec,noatime     0 0
LABEL=share1            /share1                 ext4    rw,user,noauto,exec,noatime     0 0
LABEL=share9            /share9                 ext3    rw,user,noauto,exec,noatime     0 0
LABEL=movies            /movies                 ext3    rw,user,auto,exec,noatime       0 0
LABEL=movies2           /movies2                ext3    rw,user,auto,exec,noatime       0 0
LABEL=storage00         /zstorage00             ext3    rw,user,noauto,exec,noatime     0 0
LABEL=120backup         /zbackup                ext3    rw,user,noauto,exec,noatime     0 0
LABEL=boot200           /mnt/boot               ext3    rw,user,noauto,exec,noatime     0 0
none                    /proc                   proc    defaults                        0 0
# Entry for /dev/sda2 :
LABEL=swap1000          swap                    swap    sw,pri=3                        0 0
# Entry for /dev/sdb2 :
LABEL=swap750           swap                    swap    sw,pri=3                        0 0
none                    /dev/pts                devpts  mode=0620                       0 0
/dev/fd0                /mnt/floppy             auto    rw,user,noauto,exec             0 0
/dev/sr0                /mnt/cdrom              auto    ro,user,noauto                  0 0
/dev/sr1                /mnt/dvd                auto    ro,user,noauto                  0 0
# none                  /dev/shm                tmpfs   defaults                        0 0


When both files have been properly edited, then it's time to run the mkinitrd command for your particular kernel.
Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
yeshe
Sr. Member
****
Offline Offline

Posts: 273


Forest sangha


« Reply #12 on: February 17, 2011, 05:06:36 PM »

Thank you Old Polak, you are an angel!

So far I have labelled all partitions, and now blkid says:
Code:
/dev/sda1: LABEL="WINDOWS" UUID="B074BA0574B9CDFA" TYPE="ntfs"
/dev/sda5: LABEL="WINDATA" UUID="51FDE27748FF62D3" TYPE="ntfs"
/dev/sda6: LABEL="data" UUID="4c5380f7-e164-461a-b3f2-a161512422e4" TYPE="ext3"
/dev/sdb1: UUID="04f5a953-a32d-4b13-affc-90a2f1a96ecb" TYPE="swap" LABEL="swap10"
/dev/sdb5: UUID="38388736-15b8-49f7-9b0b-5312b58d8c50" TYPE="ext4" LABEL="root10"
/dev/sdb6: UUID="640f76b5-5c72-4dee-a2b6-5eb9b1409ce5" TYPE="ext4" LABEL="home10"
and I have changed fstab to:
Code:
# Entry for /dev/sdb5 : Linux root
LABEL=root10      /              ext4     defaults,noatime            1 1
# Entry for /dev/sdb6 : Linux home
LABEL=home10      /home          ext4     rw,user,noauto,exec,noatime 1 2
#entry for /dev/sdb1 : swap (manually added 2011-02-17)
LABEL=swap10      swap           swap     sw,pri=3                    0 0

# Entry for /dev/sda6 : data
LABEL=data        /mnt/data      ext3     rw,user,auto,noatime        1 2
# Entry for /dev/sda1 : Win XP (old umask=000)
LABEL=WINDOWS     /mnt/winXP     ntfs-3g  rw,user,auto,umask=000      0 0
# Entry for /dev/sda5 : windata
LABEL=WINDATA     /mnt/windata   ntfs-3g  user,umask=000              0 0

none              /proc          proc     defaults                    0 0
none              /dev/pts       devpts   defaults                    0 0
Do I make the image by writing mkinitrd -f ?

EDIT: This is what i did after renaming the file initrd-2.6.33.7-pclos6.bfs.img as initrd-2.6.33.7-pclos6.bfs.img.old :
Code:
[root@localhost jens]# mkinitrd /boot/initrd-2.6.33.7-pclos6.bfs.img 2.6.33.7-pclos6.bfs
I will come back after reboot (if I can still boot  Shocked )
Logged
Old-Polack
Administrator
Hero Member
*****
Online Online

Posts: 9695


----IOFLU----


« Reply #13 on: February 17, 2011, 05:39:35 PM »

This is what i did after renaming the file initrd-2.6.33.7-pclos6.bfs.img as initrd-2.6.33.7-pclos6.bfs.img.old :
Code:
[root@localhost jens]# mkinitrd /boot/initrd-2.6.33.7-pclos6.bfs.img 2.6.33.7-pclos6.bfs
I will come back after reboot (if I can still boot  Shocked )

Looks good from here. Grin

When I do this I usually add the -vv argument/option in order to see what's happening during the process.

[root@localhost jens]# mkinitrd -vv /boot/initrd-2.6.33.7-pclos6.bfs.img 2.6.33.7-pclos6.bfs
Logged

Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...
yeshe
Sr. Member
****
Offline Offline

Posts: 273


Forest sangha


« Reply #14 on: February 17, 2011, 06:06:02 PM »

Wow, now everything is perfect! Thanks a lot O-P  Cheesy
And I have learned a lot from this!

There was only one problem, at first: I couldn't mount the home partition  Shocked
That was because I copied the attibutes from your fstab-file:
Code:
LABEL=home10      /home          ext4     rw,user,noauto,exec,noatime 1 2
but after changing to
Code:
LABEL=home10      /home          ext4     noatime                     1 2
...it was  OK again.

So what is the time in your country O-P? Here in Sweden it is now 00.08 (or 12.08 A.M) so it is bedtime again  Smiley
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM