Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installation using existing partitions? [SOLVED]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Wed Oct 17, 2012 5:52 am    Post subject: Reply with quote

The Doctor wrote:
I stopped using grub when the changed to grub2, so its been a long time.

I think that you need root (hd0,7) instead of (hd0,6). I seem to recall some weirdness in the disk labelling.


Thanks again.

When I was following the Gentoo guide I also thought that maybe I should use grub2, instead of grub as outlined, but when I tried to emerge grub2 got a "
not found" error so just proceeded with grub as indicated in the guide.

Changing the root to (hd0,7) instead of (hd0,6) didn't help.

I can ask for help on the grub forum but my concern is that the error being generated (17) indicates that the partition is being found, but that the file system is not recognized, which makes me think maybe it has something to do with the encryption. What do you think? What is the best way to proceed/troubleshoot this problem. I've ground to a halt.

As a side question, sometimes the Gentoo Guide was a little confusing. Whenever it referred to "root" I assumed it was referring to root on the LVM not the boot partition. I kind of thought that if it was talking about boot it would explicitly say "boot". Is that correct?
Back to top
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1431

PostPosted: Wed Oct 17, 2012 6:04 am    Post subject: Reply with quote

Quote:
As a side question, sometimes the Gentoo Guide was a little confusing. Whenever it referred to "root" I assumed it was referring to root on the LVM not the boot partition. I kind of thought that if it was talking about boot it would explicitly say "boot". Is that correct?


As far as I can recall, yes root only refers to your / partition and boot refers specifically to your /boot partition.

Are you using a no-multilib profile? grub does not like that beyond that, I am not a grub expert.
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Wed Oct 17, 2012 6:19 am    Post subject: Reply with quote

The Doctor wrote:
Quote:
As a side question, sometimes the Gentoo Guide was a little confusing. Whenever it referred to "root" I assumed it was referring to root on the LVM not the boot partition. I kind of thought that if it was talking about boot it would explicitly say "boot". Is that correct?


As far as I can recall, yes root only refers to your / partition and boot refers specifically to your /boot partition.

Are you using a no-multilib profile? grub does not like that beyond that, I am not a grub expert.


No I am not using the no-multilib profile. Anyway, if you think that I didn't botch it somewhere with the encryption setting I will post the question on the Install/Grub sub-forum and see if I come up with anything and then return here. Thanks again.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Fri Oct 19, 2012 5:29 am    Post subject: Reply with quote

The Doctor wrote:
...

next you need to mount your partitions. Make note of what they are called.

here is how to mount them: (There is no reason to mount home until you reboot to make your user.)
Code:
mkdir /mnt/gentoo
mount /dev/mapper/vg-root /mnt/gentoo
mkdir /mnt/gentoo/var /mnt/gentoo/home /mnt/gentoo/boot # I think this is valid...
mount /dev/mapper/vg-var /mnt/gentoo/var
mkdir /mnt/gentoo/var/tmp
chmod 1777 /mnt/gentoo/var/tmp
mount /dev/sda1 /mnt/gentoo/boot


What you are doing to /var/tmp is changing the file system permissions becase /var/tmp has special needs.

Now you continue as normal. Here are the exceptions: Add "static" to your use flags. You will need static lvm

-More to follow-


Hi Doctor. I am still banging my head against the will trying to sort out my Grub issues. I even installed Grub2 and am having same problems. Anyway I am about to compose a long post on Grub forum asking for help but before I do can you clarify one thing for me?

At this point in your incredibly helpful instrcutions I am still working in the sys-rescue-cd system right? What is a bit confusing to me is that all these mappings and mountings to /mnt/gentoo are taking place in the rescue cd environment. Later in the Gentoo Install Guide when I chroot into "my" environment none of these directories will exist in /mnt as far as I can tell.

Am I suppose to be chrooting first and then creating these directories/mount points? I ask because I noticed in the grub2 documentation it mentions the necessity to mount some directories once in the chroot environment not before.

As an experiment I tried to chroot before executing these commands but I get:

Quote:
root@sysresccd /mnt % chroot /mnt/gentoo /bin/bash
chroot: failed to run command `/bin/bash': No such file or directory
root@sysresccd /mnt % chroot /mnt/gentoo
chroot: failed to run command `/bin/zsh': No such file or directory


If I follow things in the sequence I thought they were in I hgert the following:

Quote:
root@sysresccd /mnt % mount /dev/mapper/vg-root /mnt/gentoo
root@sysresccd /mnt % mount /dev/mapper/vg-var /mnt/gentoo/var
root@sysresccd /mnt % chmod 1777 /mnt/gentoo/var/tmp
root@sysresccd /mnt % mount /dev/sda6 /mnt/gentoo/boot
root@sysresccd /mnt % mount -t proc none /mnt/gentoo/proc
root@sysresccd /mnt % mount --rbind /sys /mnt/gentoo/sys
root@sysresccd /mnt % mount --rbind /dev /mnt/gentoo/dev
root@sysresccd /mnt % chroot /mnt/gentoo /bin/bash
sysresccd / # env-update
>>> Regenerating /etc/ld.so.cache...
sysresccd / # source /etc/profile
sysresccd / # export PS1="(chroot) $PS1"
(chroot) sysresccd / #


I had been assuming that I was now working in my own install environment once doing this but just noticed thast command line prompt still indicates "sysresccd" after chrooting which is a bit confusing to me.

Sorry if my question is a little muddled. I am still a little confused myself but things are gradually coming together. In general non techie terms I am thinking if grub can't see my /mnt/gentoo because it isn't populated with anything (?) that might be where I am screwing up. On the off chance this might be contributing to my grub problem I'll wait on posting my next question.

Best.
Back to top
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1431

PostPosted: Fri Oct 19, 2012 4:05 pm    Post subject: Reply with quote

You can tell the difference between chrooted and not chrooted by looking at the propt. This command, export PS1="(chroot) $PS1" , says to change the prompt by anding "(chroot) " in front of the default prompt. You will still see the system resque CD bit but you wil also see the bit telling you you are chrooted.

If you are not in the chroot, I beleve that the grub commands would fail.

On a side note: chmod 1777 /mnt/gentoo/var/tmp is not nessisary. The directory should remember its premissions between installs.
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Tue Oct 23, 2012 3:56 am    Post subject: Reply with quote

Hey Doc. I have hit a wall. Do you think I should wipe the disk and start from scratch?

http://forums.gentoo.org/viewtopic-t-940244-highlight-.html
Back to top
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1431

PostPosted: Wed Oct 24, 2012 3:55 am    Post subject: Reply with quote

I think it would be more predictive to try and solve the problem. As a work around, you might consider a different boot loader if the error is occurring before the initramfs is started. Lilio is listed in the handbook, although others exist.
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Thu Oct 25, 2012 2:40 am    Post subject: Reply with quote

The Doctor wrote:
I think it would be more predictive to try and solve the problem. As a work around, you might consider a different boot loader if the error is occurring before the initramfs is started. Lilio is listed in the handbook, although others exist.


I'll give it a shot and check back in.

Is there a way I can check to see that I didn't botch something with the encryption or compile that can be causing the problem?

Thanks again.
Back to top
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1431

PostPosted: Thu Oct 25, 2012 3:51 am    Post subject: Reply with quote

Well, if things work in the chroot you are probably ok. I doubt there is anything seriously wrong, just a confused boot loader.
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Wed Nov 07, 2012 4:15 am    Post subject: Reply with quote

The Doctor wrote:
Well, if things work in the chroot you are probably ok. I doubt there is anything seriously wrong, just a confused boot loader.


Doctor, I hope you are well.

It was indeed a confused bootloader. It appeared to be caused by
Code:
real_root=/dev/mapper/vg-root crypt_root=/dev/sda2 dolvm ro
parameter not being preserved in the config file and
Code:
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
otherwise it would place root=blahblah before my parameters preventing a successful boot.

So now I can boot into my Luks on LVM Gentoo system...THANKS!

But, unfortunately it dumps me into a non graphical environment (startx does nothing). As best I can tell I accurately followed the Guide and your instructions. Am I suppose to add Gnome or KDE after the install or did I botch something else along the way?

Also no networking but I know that is probably my fault because the guide does address networking (wireless) so I'll backtrack and see if I can solve that on my own.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6495
Location: Goose Creek SC

PostPosted: Wed Nov 07, 2012 5:01 am    Post subject: Reply with quote

Code:
X -retro
if you get a black/white stippled background with a movable mouse pointer x is working.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Wed Nov 07, 2012 6:05 am    Post subject: Reply with quote

DONAHUE wrote:
Code:
X -retro
if you get a black/white stippled background with a movable mouse pointer x is working.


Nothing. I says command not found. I seem to be in a total console environment.

I tried to backtrack to see if I made a mistake anywhere and now, as best I can tel, I can't chroot into my system. I think that because the cursor doesn't say chroot-blahblah like it did before when I run the commands. Emerge also generates errors when I am chrooted, if I am indeed chrooted.

Any ideas?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6495
Location: Goose Creek SC

PostPosted: Wed Nov 07, 2012 6:12 am    Post subject: Reply with quote

follow http://www.gentoo.org/doc/en/xorg-config.xml to install X; then
Code:
X -retro
will tell if you have a working install
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Wed Nov 07, 2012 6:20 am    Post subject: Reply with quote

DONAHUE wrote:
follow http://www.gentoo.org/doc/en/xorg-config.xml to install X; then
Code:
X -retro
will tell if you have a working install


Thank you. I'll try that but I guess what I am confused about is the Install Guide. Isn't it suppose to install a working graphical Gentoo system? Or is it just installing a base system and X, KDE, etc are post-install operations?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6495
Location: Goose Creek SC

PostPosted: Wed Nov 07, 2012 6:57 am    Post subject: Reply with quote

just installs a base system. X, KDE, etc are separate install operations!
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Wed Nov 07, 2012 7:08 am    Post subject: Reply with quote

DONAHUE wrote:
just installs a base system. X, KDE, etc are separate install operations!


Ugh. They should really add that info in the end notes or a notification at the beginning. Oh well. Next steps. Thanks.
Back to top
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1431

PostPosted: Wed Nov 07, 2012 8:27 am    Post subject: Reply with quote

Just to save you from some trouble latter, you should update before you install X if you have not already done so. I believe your install is about a month or so old, which is fairly long for Gentoo to go without updates. You should install gentoolkit first, as some important system tools are included in that package.

The process is 4 commands:
Code:
emerge --sync
emerge -auvND world
# READ PORTAGE OUTPUT. It may tell you to do something important
dispatch-conf
revdep-rebuild


The first updates portage's list of available packages.
The second actually does the update "a" is for ask "u" is for update "v" is for verbose "N" is checks for new use flags and D is deep to make sure you get all the packages.
dispatch-conf will update your configuration files. The rule of thumb here is to let it update any file you did not edit and to merge any changes you made to a file you did edit with the new version.
revdep-rebuild fixes anything that breaks during the update

This is the 15 second version how to update. The documentation is in the handbook and I recommend you look it over. I would also recommend that you set a schedule for updates about once a week.
Best of luck.
_________________
First things first, but not necessarily in that order.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Wed Nov 07, 2012 9:27 am    Post subject: Reply with quote

The Doctor wrote:
Just to save you from some trouble latter, you should update before you install X if you have not already done so. I believe your install is about a month or so old, which is fairly long for Gentoo to go without updates. You should install gentoolkit first, as some important system tools are included in that package.

The process is 4 commands:
Code:
emerge --sync
emerge -auvND world
# READ PORTAGE OUTPUT. It may tell you to do something important
dispatch-conf
revdep-rebuild


The first updates portage's list of available packages.
The second actually does the update "a" is for ask "u" is for update "v" is for verbose "N" is checks for new use flags and D is deep to make sure you get all the packages.
dispatch-conf will update your configuration files. The rule of thumb here is to let it update any file you did not edit and to merge any changes you made to a file you did edit with the new version.
revdep-rebuild fixes anything that breaks during the update

This is the 15 second version how to update. The documentation is in the handbook and I recommend you look it over. I would also recommend that you set a schedule for updates about once a week.
Best of luck.


Thanks for the info. I will definitely do that but I have a couple of questions.

The way my system is now I can't connect to my network so I would like to return to using the rescue cd and tweaking my system in the chroot environment. Is that possible? I can't tell now if I am properly chrooted.

This may be related or not but when I run emerge I get an error. However the web emerge command works but indicates that the snapshot on my system is newer than the one it would bring down so stops.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6495
Location: Goose Creek SC

PostPosted: Wed Nov 07, 2012 3:55 pm    Post subject: Reply with quote

Code:
I would like to return to using the rescue cd and tweaking my system in the chroot environment.
Perfectly possible and frequently used.
boot cd, mount gentoo partitions,
Code:
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
mount -t proc none /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"

_________________
Defund the FCC.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Thu Nov 22, 2012 3:04 pm    Post subject: Reply with quote

The Doctor wrote:
10 Gb /var should be enough.

I don't see any red flags except that with /var on a separate partition udev might give you some grief. I am not exaclty sure as it seems to be mostly rumor. You will definatly be fine if as you use an initramfs or the new udev fork.

There are reasons to break up the root partition into as many as practical sections, but it is by no means required. I would say that it is not that important. If necessary you can manually clean the /usr/portage/distfiles directory to make more space. What a separate /var really does (practically) is protect you from log spam. At most, you can have a log that is 10 Gib, applications complaining left and right, and a system that still boots to solve the problem. A full root could prevent this.

Technically speaking, you can do this all with one partition. Its just a matter what you want to do. A separate /home is good for backup purposes, a separate /var prevents log spam from completely overwhelming your system, a separate /usr and /opt <does something>, etc. This really just comes down to style. So to answer your question, it is not necessary to put /usr/portage in its own partition.

As for your swap, the formula is swap=ram for suspend, so you're are more than good there.


The one (possible) concern is that your swap and operating system will not be protected with just an encrypted home. If you are not concerned about this, then its not a problem. If you are, I can say from experience that encrypting the entire system is not quite as daunting as it sounds.


I can't get my Gentoo system to work at all. Every solution I am given for a problem generates additional problems. Biggest one right now is that I can't get a graphcal environmet to install. Reallly tempted to wipe the disk and start from scratch but one thing at time.

Now emerge has crapped out on me preventing me from dealing with any of my other problems. It is generating
Code:
!!! copy /var/tmp/portage/sys-libs/libutempter-1.1.5/image/usr/lib64/libutempter.so.1.1.5 -> /usr/lib64/libutempter.so.1.1.5 failed.
!!! [Errno 28] No space left on device
on all emerges but of course the pertinent package name changes. Is it possible that a 10GB /var and 20GB root isn't sufficient???

Last edited by Budoka on Sat Nov 24, 2012 1:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6495
Location: Goose Creek SC

PostPosted: Thu Nov 22, 2012 4:53 pm    Post subject: Reply with quote

that error is most often reported when an emerge is attempted when the cd is booted and the user is not in the chroot.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Sat Nov 24, 2012 2:15 am    Post subject: Reply with quote

DONAHUE wrote:
that error is most often reported when an emerge is attempted when the cd is booted and the user is not in the chroot.


Thank you for the reply. I am chrooted when emerge throws this error.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6495
Location: Goose Creek SC

PostPosted: Sat Nov 24, 2012 4:41 am    Post subject: Reply with quote

boot cd, mount gentoo partitions, enter chroot, run
Code:
df -i
df -h

_________________
Defund the FCC.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 358
Location: Tokyo, Japan

PostPosted: Sat Nov 24, 2012 1:23 pm    Post subject: Reply with quote

DONAHUE wrote:
boot cd, mount gentoo partitions, enter chroot, run
Code:
df -i
df -h



Code:
(chroot) sysresccd / # df -i
df: ‘/sys/fs/cgroup/cpuset’: No such file or directory
df: ‘/sys/fs/cgroup/cpuacct’: No such file or directory
Filesystem           Inodes  IUsed   IFree IUse% Mounted on
rootfs              1310720 312737  997983   24% /
udev                1011240   1062 1010178    1% /dev
/dev/mapper/vg-root 1310720 312737  997983   24% /
rc-svcdir           1310720 312737  997983   24% /lib64/rc/init.d




Code:
(chroot) sysresccd / # df -h
df: ‘/sys/fs/cgroup/cpuset’: No such file or directory
df: ‘/sys/fs/cgroup/cpuacct’: No such file or directory
Filesystem           Size  Used Avail Use% Mounted on
rootfs                20G   20G     0 100% /
udev                  10M  660K  9.4M   7% /dev
/dev/mapper/vg-root   20G   20G     0 100% /
rc-svcdir             20G   20G     0 100% /lib64/rc/init.d
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 6495
Location: Goose Creek SC

PostPosted: Sat Nov 24, 2012 5:16 pm    Post subject: Reply with quote

It does appear that 20G was not enough in your case.
This is strange. I have 7.5 GB in a new install that includes X and Gnome and a few odds and ends.
From the chroot, running
Code:
cd /
du -sh $(ls  | sed -e :a -e '$!N;s/\n/ /;ta') | sort -h
will find the directory with too much content. My results on the aforementioned new install were:
Quote:
8.7M bin
20M boot
8.0K dev
4.0K error
71M etc
4.0K home
0 lib
5.7M lib32
78M lib64
16K lost+found
4.0K media
8.0K mnt
311M opt
4.0K proc
1.6M root
32K run
10M sbin
4.0K sys
20K tmp
6.6G usr
127M var
If you find a bloated directory, cd to it, run
Code:
du -sh $(ls  | sed -e :a -e '$!N;s/\n/ /;ta') | sort -h
to look for bloated subdirectory.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Goto page Previous  1, 2, 3, 4  Next
Page 3 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum