oootoo サブPCのUSBメモリにインストール失敗。これは自分用メモです。

これは、結果が失敗の作業なので読む必要は有りません。

 intelチップセットG33で。グラボNVIDIA GF-GT520で

USBメモリにインストール失敗。HDDを何とかしてリサイズで空きスペースを作る。

USBメモリにインストールはハードルがさらに高そうだ。

2014-09-30追記、 最終的にサブPCのHDDにインストール成功。USBメモリにインストールチャレンジしたのは2014-07-19あたりだと思う。追記終り。

サブPCのホストpart1 http://882323836.hatenablog.com/entry/2014/07/21/062523 

サブPCのホストpart2 googleearth7.1.2
http://882323836.hatenablog.com/entry/2014/08/11/184133

ソース 1
VirtualBoxGentoo/Linuxのインストールしたときのメモ  <--これが今、最適だと思う。

2014-0528

http://k-side.hatenablog.jp/entry/2014/05/28/171801
の受け売りですので上記httpに行って見て下さい。

sda1  /boot ext4     150MB
sda2  swap linux-swap  0.5GB
sda3  /   ext4     13GB ?      
***************************************

ここからが作業の開始です。


キーボードは22のjapanを選択する。

 

作成したファイルシステムをマウント
# mount /dev/sda3 /mnt/gentoo/
# mkdir /mnt/gentoo/boot
# mount /dev/sda1 /mnt/gentoo/boot

 

# swapon /dev/sda2

 

# date  <ーーーー単なる確認。

# cd /mnt/gentoo
# links www.gentoo.org/main/en/mirrors.xml  

JAISTで落とした。まず↓矢印キーでJAPANでportageの入手
snapshots > portage-latest.tar.bz2 とたどって落とす。

Tabキーでyes、no Enterキーを押してdownloadが開始される。


Escキーと↓矢印キーでGO BACKでEnterキーを押して戻ってから↓矢印キーで
releases > amd64 > autobuilds > 20140619 >stage3-amd64-20140619.tar.bz2

Tabキーでyes、no Enterキーを押してdownloadが開始される。
落としたらEscキーと↓矢印キーでExitでEnterキーを押して抜けて
# ls でdownloadした物の色が赤で表示か確認の事、白色だとマズイです。

# tar xvjpf stage3-*.tar.bz2 
# tar xvjpf portage-*.tar.bz2 -C usr/
ミラーの選択JAISTらしき所を選択する。httpで。 
これはスペースキーで*マークで確定していた。Enterキーを押して確定実行。

# mirrorselect -ioH >> etc/portage/make.conf
# mirrorselect -ior >> etc/portage/make.conf

必要なファイルを更新して chroot でインストール環境に入ります。
# cp -L /etc/resolv.conf etc/
# mount -t proc none proc/
# mount --rbind /dev/ dev/
# chroot . /bin/bash  <ーーーここはchroot スペース ドット スペース /bin/bash なので注意の事。
# env-update
# source /etc/profile
# export PS1="(chroot) $PS1"

Profileここではdefault/linux/x86/13.0/desktopに設定しています。

# eselect profile list

Available profile symlink targets:
[1] default/linux/amd64/13.0
[2] default/linux/amd64/13.0/selinux
[3] default/linux/amd64/13.0/desktop
[4] default/linux/amd64/13.0/desktop/gnome
以下略

# eselect profile set 3

 

# nano /etc/portage/make.conf     <ーーーここをA地点とする。

-----------------------------------------------------------------------
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
CFLAGS="-O2 -pipe"   

CFLAGS="-O2 -march=native -pipe" 

CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"
# These are the USE flags that were used in addition to what is provided by the
# profile used for building.
USE="bindist mmx sse sse2"

 

下記のVIDEO_CARDS="に何を書き込むかがGentooでも重要

INPUT_DEVICES="evdev keyboard mouse"

 

VIDEO_CARDS="nvidia" <ーーー3回目は最後のrebootの後に書き込んでroot # emerge --ask --changed-use --deep @world をしようと思う。

 

MAKEOTS="-j3"  
LINGUAS="ja"

PORTDIR="/usr/portage"
PISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"

 
GENTOO_MIRRORS="http://ftp.jaist.ac.jp/pub/Linux/Gentoo/"  

SYNC="rsync://rsync3.jp.gentoo.org/gentoo-portage"   
-----------------------------------------------------------------------

# nano /etc/portage/package.mask

 >x11-drivers/nvidia-drivers-174       なのか?

your card as a legacy card you need to mask なので不要と思う。

-------------------------------------------------------------------------

カーネルコンパイル genkernelで
# emerge --sync
# emerge gentoo-sources
# emerge genkernel
# genkernel all   <ーーここも結構時間が掛かる。30分位か。


fstabの編集
# nano /etc/fstab
/dev/sda1 /boot ext4 noauto,noatime 1 2
/dev/sda3 / ext4 noatime     0 1
/dev/sda2 none swap sw    0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
#/dev/fd0 /mnt/floppy auto noauto    0 0   <ーーー#を付加した。

時刻の設定
# cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

言語設定
# nano /etc/locale.gen
en_US.UTF-8 UTF-8
ja_JP.UTF-8 UTF-8
# locale-gen

ホストネーム設定
# nano /etc/conf.d/hostname
hostname="Gentoo Linux"

ネットワーク設定
# ifconfig

アダプタ名を確認。メモに書き込む。今回はenp0s25だった,  .xxx.yyy と.xxx.は# ifconfigの表示を書き込んだメモを見て打ち込んで下さい。.


# nano /etc/conf.d/net

config_enp0s25=( "192.168.xxx.yyy netmask 255.255.255.0 brd 192.168.xxx.255" )

routes_enp0s25=( "default via 192.168.xxx.1" )  <ーーソース 2より。ここ2行は。


# ln -s /etc/init.d/net.lo /etc/init.d/net.enp0s25
# rc-update add net.enp0s25 default  

キーマップの設定
# nano /etc/conf.d/keymaps
keymap="jp106" 

パスワード更新
# passwd

syslogとcronをemergeする
# emerge syslog-ng
# rc-update add syslog-ng default
# emerge vixie-cron
# rc-update add vixie-cron default

ブートローダーの設定
# emerge grub
# cd /boot
# mkdir grub
# grub2-mkconfig -o /boot/grub/grub.cfg
# grub2-install /dev/sda
  <ーーーこの順序でOK。

chrootから抜ける
# exit  

アンマウント
# umount -l dev/
# umount -l proc/
  

この辺りでPCからminimalCDを外しておく
 

# reboot  


でエラー表示、# haltでもエラー表示、仕方が無いのでタップスイッチをOFFにしてPCの電源を落とし、タップスイッチをONにしてPCの電源SWをONにして

grub>  の表示でここで作業終了。

 

以下不要

********************************************************************************************

再起動出来た。

root

パスワード


以下下記はVirtualBoxGentoo/Linuxのインストールしたときのメモ  2014-0528
http://k-side.hatenablog.jp/entry/2014/05/28/171801
と全く同じなので上記のhttpに行って見て下さい。リンク切れに成るとマズイので書き込んだ。


一般ユーザーhogeの作成
# useradd hoge -d /home/hoge
# cd /home
# mkdir hoge
# chown -R hoge:hoge hoge
# passwd hoge
# emerge sudo  
# groupadd sudo
# visudo   
%sudo ALL=(ALL) ALL


# usermod -G sudo hoge
# emerge app-misc/screen  
# emerge dev-vcs/git  <ーーVIDEO_CARDS="intel" の時146個

emergeで3時間掛った。  

 LXDEXorg関係を入れる。

# emerge lxde-meta    <ーー71個emerge 50分掛った。

# emerge xorg-x11    <ーー98個emerge 45分掛った。

# emerge lxdm
# emerge twm
# emerge xf86-input-evdev

ディスプレイマネージャーを設定。
# nano /etc/conf.d/xdm
DISPLAYMANAGER="lxdm"

一応LXDEが起動するように設定。
# nano /home/ユーザー名/.xinitrc
exec startlxde

dbusとxdmを自動起動するように設定。
# rc-update add dbus default
# rc-update add xdm default

 

# reboot

 

Gentooが起動しましたがCUIでした。

root

パスワード

# に成った。

# emerge --ask --changed-use --deep @world

でyes/noを聞いてきたのでyes enter で長々としたemergeが終わって 50分?
# reboot
LXDEの画面が出ませんでた。

ソース 1
VirtualBoxGentoo/Linuxのインストールしたときのメモ  2014-0528
http://k-side.hatenablog.jp/entry/2014/05/28/171801     <--これが今、最適だと思う。

ソース 2
Gentoo Linux x86_64 on VMware Player on Windows 7 構築メモ [その1]  2011 年 1 月 17 日
http://blog.chira-ura.info/2011/01/17/543

 ------------------------------------------------------------------------------------------------------

NVidia/nvidia-drivers

http://wiki.gentoo.org/wiki/NVidia/nvidia-drivers

 

 Xorg/Configuration

https://wiki.gentoo.org/wiki/Xorg/Configuration

 

 Nouveau & nvidia-drivers switching

http://wiki.gentoo.org/wiki/Nouveau_%26_nvidia-drivers_switching

 

 NVIDIA Driver with Optimus Laptops

http://wiki.gentoo.org/wiki/NVIDIA_Driver_with_Optimus_Laptops

 

 Gentoo Linux nVidiaガイド

ページの更新日 2008年 9月 13日
この翻訳はすでにメンテナンスされていません。

 http://www.gentoo.org/doc/ja/nvidia-guide.xml?style=printable

 ******************************************************************************************

 

root # echo ">x11-drivers/nvidia-drivers-174" >> /etc/portage/package.mask

 

root # eselect kernel list
Available kernel symlink targets:
  [1]   linux-3.7.10-gentoo *
  [2]   linux-3.7.9-gentoo

 

root # eselect kernel set 1

Drivers

Now it's time to install the drivers. You can do this by first following the X Server Configuration HOWTO and setting VIDEO_CARDS="nvidia" in /etc/portage/make.conf. When you install the X server, it will then install the right version of nvidia-drivers for you.

Note
The drivers can be installed with the gtk USE flag set in /etc/portage/make.conf. This will install media-video/nvidia-settings, a handy graphical tool for monitoring and configuring several aspects of your nVidia card.
Important
Every time you compile a new kernel or recompile the current one, you will need to reinstall the nVidia kernel modules. An easy way to rebuild the modules installed by ebuilds (such as nvidia-drivers) is to run emerge @module-rebuild.

Once the installation has finished, run modprobe nvidia to load the kernel module into memory. If this is an upgrade, you should remove the previous module first.

root # lsmod | grep nvidia
root #
rmmod nvidia
root #
modprobe nvidia
user $ glxinfo | grep direct
direct rendering: Yes
root # eselect opengl set nvidia
 
root # emerge --ask xorg-server
root # env-update
root #
source /etc/profile