View previous topic :: View next topic |
Author |
Message |
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Tue May 22, 2012 8:53 am Post subject: Installation stopped by chroot /mnt (No such file ...) |
|
|
Hi,
I am surprised I though having post this question yesterday evening.
I installed back SMS 1.6.5 by following the 2.3 Installing SMS LVM.
But I stopped when I tried to run chroot /mnt because it told me this error :
No such file or directory.
I checked and saw chroot is well existing. Then how could I run it before continuing with the lilo configuraiton and then be able to reboot the server.
Sincerely thanks and have a nice day,
Miguipda _________________ Miguipda |
|
Back to top |
|
baboo Senior Member
Joined: 04 Sep 2007 Posts: 676
|
Posted: Tue May 22, 2012 3:57 pm Post subject: |
|
|
I have installed with lvm support many times. The instructions absolutely work. After install do not reboot. Exit to command line and type chroot /mnt. Make your changes run lilo and so on ...
Without the exact steps that you did, I can only guess what you did. |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue May 22, 2012 4:08 pm Post subject: |
|
|
Did you by any chance chroot twice?
You need to "exit" to chroot again...
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Tue May 22, 2012 4:37 pm Post subject: |
|
|
Dear Gerasimos_h,
as I though explained in a previous post I never discovered (may be I missed the submit... ) I installed the native on an USB. Then I boot my usually used computer on this native USB to install SMS on the connected external HDD (I will connect back to the server after the installation). And this is due to the fact I do not have any display, keyboard and mouse connected to the server. Then installing SMS on this external HDD until the final reboot has worked until this chroot.
Indeed I realized all the setup process and exit from this setup display to get back the prompt to be able to make the chroot /mnt
For each time I tried the chroot /mnt I always got the error :
chroot : can 't execute '/bin/sh' : Nos such file or directory
And I verified the chroot was well available as a command line.
This why I asked how to solve it before continuing the lilo modification and then put back this external HDD to the server for the next reboot.
Sincerely thanks and have a nice day,
Miguipda _________________ Miguipda |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Tue May 22, 2012 5:58 pm Post subject: |
|
|
What's the output of 'mount' before running chroot?
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Wed May 23, 2012 4:40 pm Post subject: |
|
|
Dear gerasimos_h,
I checked the mount situation like this :
1) connected back and boot my computer with my Native SMS USB key (/dev/sdb1)
2) my SMS external HDD was also connected to my computer (composed like this) ;
a) /dev/sdc1 : /boot
b) /dev/sdc2 : swap
c) /dev/sdc3 : /
d) /dev/sdc4 : /mnt/server-data (personal local on this server)
3) as the SMS was previously installed (with LVM partitions as explained in the 2.3 wiki) I just reboot on the 1) with the connected 2) (explained here above) = boot (OK) then login as root (OK)
4) to be sure I run again the setup but directly exit by using the exit setup menu (to be sure to come back to the last previous situation)
5) and run the mount to tell you that gives me :
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
Now what must I do to be able to run the chroot /mnt
sincerely thanks and have a nice day,
Miguipda _________________ Miguipda |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Wed May 23, 2012 6:42 pm Post subject: |
|
|
I'm a little confused, I'll try to guess what you want to do...
Does /dev/sdc{1,2,3,4} are in LVM or your sda partition is?
There must be a /dev/sda since you only mention /dev/sdb and /dev/sdc.
If it's on /dev/sda you need to activate you LVM if you already create it, from a previous setup, by runnning
1. Scan disks for Logical Volume Groups
vgscan --mknodes
2. Activate Logical Volume Groups
vgchange -ay
Once you activate them mount them in /mnt like
mount /dev/sms/root /mnt
mount /dev/sda1 /mnt/boot
and continue with other logical volumes you may create before e.g.
mount /dev/sms/home /mnt/home
e.t.c...
Once you finish mounting all your volumes you are ready to chroot to /mnt
I hope I understand correct what you are trying to do...
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Thu May 24, 2012 8:27 am Post subject: |
|
|
Hi,
I can not now try all you explained and I remember I prefectly followed the explained information on point 2.3 when you talk about the vgchange
Then when I will go back home I will check what you talk about.
For the /dev/sda let me remember what I did.
1) my SMS Server use two external HDD. One for SMS OS and one as data.
2) as SMS is installed on an external HDD I can connect it to my other computer I usually use to work. This is due to the fact I do not have a display, a keyboard and a mouse connected to the server. Then it is easier for me to disconnect the external HDD from the server and connect it to my working computer to boot this working computer with the SMS USB key (to be able to configure the connected external HDD). Then this working computer has indeed its own /dev/sda I did not talked about due to the fact they are the working computer HDD where I have Slax and Windows installed.
3) Then as explained before I boot my working computer from the SMS USB Key to be able to configure the external HDD. I want to configure it until the last reboot (it means just after the lilo configuration). After that I could connect back the external HDD to the server and boot it to be able to finalize the SMS configuration.
4) and this is why I talked about the fact it is necessary to be able to connect to the server in remote (without local display keyboard and mouse) to finalize the configuration.
I hope you well understood now why I just talked about the two connected SMS USB Key (/dev/sdc) needed to configure the connected external HDD (/dev/sdb). It is due to the fact the /dev/sda are internal HDD of my working computer I used to configre my external SMS HDD OS.
Sincerely thanks and have a nice day,
Miguipda
Did you well understood this ? _________________ Miguipda |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Thu May 24, 2012 12:23 pm Post subject: |
|
|
OK! Follow above instructions and replace sda with sdb in your commands.
Remember that you might switch /dev/sdb to .dev.sda when you finish to be able to boot, since now your disk is sdb but when it boots alone most likely it will be sda, unless your
second external hdd get the sda so it will be the same.
Try to see if you can find and activate LVM and try to mount it.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Thu May 24, 2012 3:04 pm Post subject: |
|
|
Hi,
yes I know I must pay attention that my current /dev/sdb will become /dev/sda.
It was just the problem of the famous command line chroot.
I will try your instructions this evening or may be morning.
Sincerely thanks and have a nice day,
Miguipda _________________ Miguipda |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Sat May 26, 2012 10:48 am Post subject: |
|
|
Hi,
still just one thing.
As I all made on the /dev/sdb by following your above instruction.
Then after the chroot /mnt which file must I precisly modify to change all /dev/sdb to the /dev/sda before connect back this external HDD to the router to be sure it will start perfectly ?
Sincerely thanks and have a nice day,
Miguipda _________________ Miguipda |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Sat May 26, 2012 11:22 am Post subject: |
|
|
Since you have two external HDD you might not need to do anything as it might see it as /dev/sdb if you switch USB ports, but in case you want to switch to /dev/sda
1. /etc/fstab
2. /boot/initrd-tree/rootdev (LVM not needed)
3. /etc/lilo.conf
4. files in
/etc/lvm/archive/
/etc/lvm/backup/
Rebuild initrd.gz (LVM not needed) and run 'lilo'.
gerasimos_h _________________ Superb! Mini Server Project Manager
http://sms.it-ccs.com |
|
Back to top |
|
miguipda Member
Joined: 14 Jul 2011 Posts: 93
|
Posted: Sat May 26, 2012 11:36 am Post subject: |
|
|
Hi,
I just tried it now like this :
1) boot on Native SMS USB Key (/dev/sdc1)
2) changed the keymap to azerty be...
3) scan logical : vgscan --mknodes
4) activated LVM Group : vgchange -ay
5) checked : ls /dev/sms
returned : home@ root@
6) mount /dev/sms/root /mnt
mount /dev/sms/home /mnt/home
mount /dev/sdc1 /mnt/boot
7) tried : chroot /mnt
returned : chroot : can 't execute '/bin/sh' : Nos such file or directory
As you can see the problem still there.
As my server does not have a CD or DVD reader it could be the same problem because I also need to boot with the Native SMS USB Key.
How can I solve it ?
Sincerely thanks and have a nice day,
Miguipda _________________ Miguipda |
|
Back to top |
|
gerasimos_h Site Admin
Joined: 09 Aug 2007 Posts: 1757 Location: Greece
|
Posted: Sat May 26, 2012 11:53 am Post subject: |
|
|
Did you see actually mounted volumes?
e.g. 'ls -l /mnt/' should output a root tree.
Also what's the output of "mount" after mounting volumes...
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 May 27, 2012 2:43 pm Post subject: |
|
|
Hi,
I stop to try installing it on the LVM partition because I can not succeed with it.
Then I tried a classic installation :
http://sms.it-ccs.com/forum/viewtopic.php?p=3178#3178
Sincerely thanks for all your help.
Have a nice day,
Miguipda
P.S. : for me this post could be deleted. _________________ Miguipda |
|
Back to top |
|
|