View previous topic :: View next topic |
Author |
Message |
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Sun Jun 03, 2012 10:38 am Post subject: |
|
|
Hi,
Yes of course but as I made chroot /mnt as you ssome days said.
What about thie received error when I tried your :
Code: | blkid /dev/sda3 |cut -d '"' -f 2 >> /mnt/etc/fstab |
Received error message : sh: /mnt/etc/fstab: No such file or directory
due to the fact ls /mnt/etc revealed an empty folder ?
And if I tried you given command line :
in place of a :
the simple fact to finalize with a / returned the error message :
sh: chroot /mnt/: No such file or directory
Sincerely thanks.
Miguipda
_________________ Miguipda |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Sun Jun 03, 2012 10:44 am Post subject: |
|
|
I just made now without any error message the give command line :
Code: | chroot /mnt
mkinitrd -k 3.2.14-smp -r /dev/sda3 -m ext4:ehci_hcd:ohci_hcd:uhci_hcd -f ext4 |
And my current /mnt just contains this (ls /mnt) :
README cdrecorder cdrom dvd floppy hd memory tmp zip
Then I can not change the fstab as explained because it return the error message saying No such file or directory (normal /mnt does not contain the etc folder) :
blkid /dev/sda3 |cut -d '"' -f 2 >> /mnt/etc/fstab
Received error message :
sh: /mnt/etc/fstab: No such file or directory
Then ... ?
Thx,
Miguipda
_________________ Miguipda |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Sun Jun 03, 2012 10:55 am Post subject: |
|
|
OK! to clear some things...
When you boot from SMS installer there is only a /mnt
so you need to mount
Code: | mount /dev/sda3 /mnt/
mount /dev/sda1 /mnt/boot/ |
When you boot from SMS.LiveCD you need to create a mount point like
Code: | mkdir /mnt/tmp
mount /dev/sda3 /mnt/tmp
mount /dev/sda1 /mnt/tmp/boot/ |
Replace /dev/sda in above commands with your device.
After mount you should have a proper root tree e.g. when you run
"ls /mnt" or "ls /mnt/tmp" accordingly you should have
bin boot etc lib ....e.t.c
If you confirm all the above continue to chroot and editing fstab and lilo.conf.
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Sun Jun 03, 2012 11:35 am Post subject: |
|
|
Well I restarted my setup.
after having done and exit the setup process I ran those command lines withour receiving error message (ok) :
Code: | chroot /mnt/
mkinitrd -k 3.2.14-smp -r /dev/sda3 -m ext4:ehci_hcd:ohci_hcd:uhci_hcd -f ext4 |
Then I checked what is in the /mnt and it returned (ls /mnt) :
<prompt># README cdrecorder cdrom dvd floppy hd memory tmp zip
Then as explained it will return an error message when trying to change the (unexisting /mnt/etc/) fstab.
What did I missed ? I can not understand. If bth chroot and lkinitrd worked perfectly why my /mnt does not contain any /mnt/etc/fstab ? Then how to solve this to be ablt to continue ?
Miguipda
P.S. : before doing the chroot /mnt/ this time I checked if well mounted point by doing those command lines :
Code: | mount /dev/sda3 /mnt/
mount /dev/sda1 /mnt/boot/ |
They both returned :
mount: /dev/sda3 already mounted or /mnt/busy
mount: according to mtab, /dev/sda3: already mounted on /mnt
(and similar message according to the sda1 mounted point)
I then understood I can do your chroot /mnt/ without having problem. That is what I made.
_________________ Miguipda |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Sun Jun 03, 2012 11:45 am Post subject: |
|
|
Quote: | PostPosted: Sun Jun 03, 2012 11:35 am Post subject:
Well I restarted my setup.
after having done and exit the setup process I ran those command lines withour receiving error message (ok) :
Code:
chroot /mnt/
mkinitrd -k 3.2.14-smp -r /dev/sda3 -m ext4:ehci_hcd:ohci_hcd:uhci_hcd -f ext4
Then I checked what is in the /mnt and it returned (ls /mnt) :
<prompt># README cdrecorder cdrom dvd floppy hd memory tmp zip |
you forgot to exit from chroot. That's your error.
Code: | chroot /mnt/
mkinitrd -k 3.2.14-smp -r /dev/sda3 -m ext4:ehci_hcd:ohci_hcd:uhci_hcd -f ext4
exit |
Once you exit type "ls -l /mnt" and you will see your root tree.
Then edit fstab and lilo.conf.
and run
Code: | lilo -C /mnt/etc/lilo.conf |
Don't forget to put your current device in
boot=/dev/sdX
in lilo.conf
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Sun Jun 03, 2012 12:13 pm Post subject: |
|
|
You right.
I missed the exit command line because I really though it will definitively exit the root login.
I perfectly finalized the setup but when I boot I received this :
...
Error: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
You can try fix it. Type 'exit' when things are done. sda: sda1 sda2 sda3 sda4
No caching node page present.
...
/bin/sh: can't access tty; job control turned off
#_ <prompt>
Then when typed exit and enter I got a :
kernel panic - not syncing: Attempted to kill init
Pid 1: 1, comm: switch_root Not tainted 3.2.14-smp #2
Call trace ...
Well how to solve this now ?
Have a nice day,
Miguipda
_________________ Miguipda |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Sun Jun 03, 2012 12:28 pm Post subject: |
|
|
Is your lilo.conf correct?
Something like
Code: | # LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
append="root=UUID=21323233-232-12231232"
LBA32
boot = /dev/sda
prompt
timeout = 20
compact
change-rules
reset
vga = 791
image = /boot/vmlinuz
root = "UUID=21323233-232-12231232"
label = SMS
initrd=/boot/initrd.gz
read-only |
Post you fstab and lilo.conf to inspect.
Also don't forget , in every change of lilo.conf you need to run lilo again, and don't forget to always change
boot=/dev/sdX with your current device.
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Sun Jun 03, 2012 1:33 pm Post subject: |
|
|
Hi,
here is my fstab modified by the given command line :
Code: | /dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 defaults 1 1
/dev/sda1 /boot ext4 defaults 1 2
/dev/sda4 /mnt/SERVEUR-DATA ext4 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/sda3: UUID="c684950e-6d8d-42a6-a483-da1750dd245a" TYPE="ext4"
/dev/sda1: UUID="41daffb5-df2f-4550-a61f-c35c48e46aec" TYPE="ext4"
/dev/sda2: UUID="bb8dc462-fd50-4fb0-bb79-73a294a4fff5" TYPE="swap"
/dev/sda4: UUID="120f488e-e0ec-4bd3-9228-c13f10bc7520" TYPE="ext4"
|
And here is my lilo.conf :
Code: | # LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
#append="splash=verbose"
#bitmap=/boot/sms.bmp
#bmp-colors=95,,,75,,1
#bmp-timer=,,95,75,1
append="root=UUID=c684950e-6d8d-42a6-a483-da1750dd245a"
LBA32
#raid-extra-boot = mbr-only
boot = /dev/sda
prompt
timeout = 30
compact
change-rules
reset
vga = 791
image = /boot/vmlinuz
root = "UUID=c684950e-6d8d-42a6-a483-da1750dd245a"
label = SMS
initrd = /boot/initrd.gz
read-only
|
When I modified the fstab and lilo.conf I of course ran this given command line :
Code: | lilo -C /mnt/etc/lilo.conf |
And of course I used the sdX following my system (sda3 for / and sda1 for boot).
What does I made wrong ?
Thx,
Miguipda
_________________ Miguipda |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Sun Jun 03, 2012 1:42 pm Post subject: |
|
|
Here is your fstab
Code: | UUID=bb8dc462-fd50-4fb0-bb79-73a294a4fff5 swap swap defaults 0 0
UUID=c684950e-6d8d-42a6-a483-da1750dd245a / ext4 defaults 1 1
UUID=bb8dc462-fd50-4fb0-bb79-73a294a4fff5 /boot ext4 defaults 1 2
UUID=120f488e-e0ec-4bd3-9228-c13f10bc7520 /mnt/SERVEUR-DATA ext4 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0 |
Replace your fstab and boot, no need to run lilo for that...
gerasimos_h
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Sun Jun 03, 2012 2:24 pm Post subject: |
|
|
I perfectly modified the fstab but when I boot I received this :
...
Error: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
You can try fix it. Type 'exit' when things are done. sda: sda1 sda2 sda3 sda4
No caching node page present.
...
/bin/sh: can't access tty; job control turned off
#_ <prompt>
As I know the exit command will not change anything I did not made it.
As we did not progress even whith the fstab modification what is still wrong now ?
Sincerely Thx
Miguipda
_________________ Miguipda |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Sun Jun 03, 2012 2:49 pm Post subject: |
|
|
Quote: | And of course I used the sdX following my system (sda3 for / and sda1 for boot). |
If you boot from SMS Installer, did you see it as /dev/sda or /dev/sdb?
Your root partition now is not in sda3 it is taken from UUID.
So plug your external USB HDD, to your workstation, and boot with SMS or any other linux system with lilo, and run the command editing lilo.conf accordingly to your USB HDD.
You might see your USB HDD installation as /dev/sdc.
Edit lilo.conf with
boot=/dev/sdc
and run lilo
Here is an example with USB HDD assign /dev/sdc
Code: | mkdir /mnt/usb
mount /dev/sdc3 /mnt/usb
mount /dev/sdc1 /mnt/usb/boot/
lilo -C /mnt/usb/etc/lilo.conf |
Also before kernel panic you should see a loading kernel modules info.
When you create the initrd.gz did you notice an adding modules info to initrd?
If you didn't notice try creating the initrd again and notice, you should see about adding 4-5 usb modules.
I'm attaching my initrd.gz to test if you like, it use 3.2.14-smp.
Always run lilo after a modification regarding lilo.conf.
gerasimos_h
Description: |
|
Download |
Filename: |
initrd.gz |
Filesize: |
1.57 MB |
Downloaded: |
2005 Time(s) |
_________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Sun Jun 03, 2012 3:42 pm Post subject: |
|
|
> If you boot from SMS Installer, did you see it as /dev/sda or /dev/sdb?
As said my computer always boot the SMS USB as /dev/sdb1 and external HDD on which I installed SMS as /dev/sda
> Your root partition now is not in sda3 it is taken from UUID.
I well understood this.
> run the command editing lilo.conf accordingly to your USB HDD
I did it and as shown here before you can see the UUID are well set and the boot to /dev/sda well modified
lilo.conf :
Code: | # LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
#append="splash=verbose"
#bitmap=/boot/sms.bmp
#bmp-colors=95,,,75,,1
#bmp-timer=,,95,75,1
append="root=UUID=c684950e-6d8d-42a6-a483-da1750dd245a"
LBA32
#raid-extra-boot = mbr-only
boot = /dev/sda
prompt
timeout = 30
compact
change-rules
reset
vga = 791
image = /boot/vmlinuz
root = "UUID=c684950e-6d8d-42a6-a483-da1750dd245a"
label = SMS
initrd = /boot/initrd.gz
read-only |
Also as already said when I modified the lilo.conf with the UUID as you told me I ran :
Code: | lilo -C /mnt/etc/lilo.conf |
I will check for the USB modules you talked about in the initrd.
_________________ Miguipda |
|
Back to top |
|
|