Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
My Gentoo Installation Note
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
XQZS
n00b
n00b


Joined: 20 Oct 2013
Posts: 56

PostPosted: Sun May 25, 2014 2:07 am    Post subject: My Gentoo Installation Note Reply with quote

Script for wine
Code:

#!/bin/bash
# this is the wrapper to launch windows foxit reader
foxit_reader='/home/andrew/app/Foxit Reader.exe'
root_drive='Z:\'
param=''
 
# get the correct file name that maybe include space
   for file in $@
   do 
     param="$param $file"
   done   
   filename=${param:1}
   checkfilename="$filename"
 
# if the file path is not full path, we should expand it
   if [ ! `echo $filename | grep ^/` ]; then
     filename="$(pwd)/$filename"
   fi
 
# format path under wine (Z:\ is the root in wine)
   launch_param="${root_drive}$(echo "$filename" | sed 's/\//\\/g')"
     
# run foxit reader in the background
   if [ -z ${checkfilename} ]; then
     wine "$foxit_reader" &
   else
     wine "$foxit_reader" "$launch_param" &
   fi


Kernel tips
Quote:

From
General setup --->
[ ] Configure standard kernel features (expert users)
To
General setup --->
[*] Configure standard kernel features (expert users)
Must set:
Kernel hacking --->
CONFIG_DEBUG_MEMORY_INIT=y
Otherwise, when booting the new linux system, one of the following two faults would take place:
(1) dump_stack+0x19/0x1b
panic+oxb6/0x1b5
(2) Kernel panic - not syncing: VFS: Unable to mount root fs on unknown block(0,0)

------------------------------------------------------------------------
Intel 82579LM:
[*] Intel devices │ │
│ │ < > Intel(R) PRO/100+ support │ │
│ │ < > Intel(R) PRO/1000 Gigabit Ethernet support │ │
│ │ <*> Intel(R) PRO/1000 PCI-Express Gigabit Ethernet support │ │
│ │ <*> Intel(R) 82575/82576 PCI-Express Gigabit Ethernet support


Misc
Partition
Code:

Device     Boot     Start       End    Blocks  Id System
/dev/sda1  *         2048   3071999   1534976   7 HPFS/NTFS/exFAT   win7self
/dev/sda2         3072000 128909311  62918656   7 HPFS/NTFS/exFAT   C:23.4G free of 60G  Sys
/dev/sda3       128909312 170856495  20973592   7 HPFS/NTFS/exFAT   Q:19.4G free of 20G  Users
/dev/sda4       170860542 976771071 402955265   f W95 Ext'd (LBA)     
/dev/sda5       170860544 296697855  62918656   7 HPFS/NTFS/exFAT   S:49.1G free of 60G  App
/dev/sda6       296699904 422537215  62918656   7 HPFS/NTFS/exFAT   T:59.8G free of 60G  Data
/dev/sda7       422539264 464482303  20971520   c W95 FAT32 (LBA)   U:18.0G free of 20G  Gentoo
/dev/sda8  *    464484352 465508351    512000  83 Linux
/dev/sda9       465510400 499064831  16777216  83 Linux
/dev/sda10      499066880 603924479  52428800  83 Linux
/dev/sda11      603926528 792670207  94371840  83 Linux
/dev/sda12      792672256 801060863   4194304  83 Linux
/dev/sda13      801062912 853491711  26214400  83 Linux
/dev/sda14      853493760 872368127   9437184  82 Linux swap / Solaris
/dev/sda15      872370176 976771071  52200448  83 Linux
 
 
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda11       89G  2.2G   82G   3% /
udev             10M  4.0K   10M   1% /dev
tmpfs           3.9G  712K  3.9G   1% /run
shm             3.9G     0  3.9G   0% /dev/shm
cgroup_root      10M     0   10M   0% /sys/fs/cgroup
/dev/sda7        20G  2.0G   19G  10% /data
/dev/sda9        16G  177M   15G   2% /var
/dev/sda10       50G  345M   47G   1% /home
/dev/sda12      3.9G  1.1G  2.6G  31% /usr/src
/dev/sda13       25G  2.4G   21G  11% /usr/portage
tmpfs           4.0G   17M  4.0G   1% /tmp
tmpfs           5.0G  4.0K  5.0G   1% /var/tmp


rc log
Quote:


rc sysinit logging started at Sun May 25 12:15:58 2014


OpenRC 0.12.4 is starting up Gentoo Linux (x86_64)

* /proc is already mounted
* Mounting /run ...
mount: wrong fs type, bad option, bad superblock on tmpfs,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.
* /run/openrc: creating directory
* /run/lock: creating directory
* Using /dev mounted from kernel ...
[ ok ]
* Mounting /dev/mqueue ...
[ ok ]
* Mounting /dev/shm ...
[ ok ]
* Creating list of required static device nodes for the current kernel ...
[ ok ]
* Mounting debug filesystem ...
[ ok ]
* Mounting cgroup filesystem ...
[ ok ]
* setting up tmpfiles.d entries for /dev ...
[ ok ]
* Starting udev ...
[ ok ]
* Generating a rule to create a /dev/root symlink ...
[ ok ]
* Populating /dev with existing devices through uevents ...
[ ok ]
* Waiting for uevents to be processed ...
[ ok ]

rc sysinit logging stopped at Sun May 25 12:15:58 2014


rc boot logging started at Sun May 25 12:15:58 2014

* Setting system clock using the hardware clock [UTC] ...
[ ok ]
* Loading module hdaps ...
[ ok ]
* Loading module thinkpad_ec ...
[ ok ]
* Loading module tp_smapi ...
[ ok ]
* Autoloaded 3 module(s)
* Checking local filesystems ...
[ ok ]
* Remounting root filesystem read/write ...
[ ok ]
* Remounting filesystems ...
mount: /run not mounted or bad option

In some cases useful info is found in syslog - try
dmesg | tail or so.
[ ok ]
* Updating /etc/mtab ...
[ ok ]
* Activating swap devices ...
[ ok ]
* Mounting local filesystems ...
mount: wrong fs type, bad option, bad superblock on tmpfs,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.
mount: wrong fs type, bad option, bad superblock on tmpfs,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.
* Some local filesystem failed to mount
[ !! ]
* Configuring kernel parameters ...
[ ok ]
* Creating user login records ...
[ ok ]
* Wiping /tmp directory ...
[ ok ]
* Restoring Mixer Levels ...
[ ok ]
* Setting hostname to localhost ...
[ ok ]
* Setting terminal encoding [UTF-8] ...
[ ok ]
* Setting keyboard mode [UTF-8] ...
[ ok ]
* Loading key mappings [us] ...
[ ok ]
* Bringing up network interface lo ...
[ ok ]
* Mounting misc binary format filesystem ...
[ ok ]
* Loading custom binary format handlers ...
[ ok ]
* Restoring file contexts for dynamically generated files ...
[ ok ]
* Restoring file contexts in /dev ...
[ ok ]
* Not switching to enforcing mode, or enforcing mode already enabled
* Activating additional swap space ...
[ ok ]
* setting up tmpfiles.d entries ...
[ ok ]
* Initializing random number generator ...
[ ok ]

rc boot logging stopped at Sun May 25 12:16:02 2014


rc default logging started at Sun May 25 12:16:02 2014

* Starting metalog ...
[ ok ]
* Starting acpid ...
[ ok ]
* Running cpupower -c all frequency-set --governor ondemand ...
[ ok ]
* Starting gpm ...
[ ok ]
* Starting Hard Drive Active Protection System daemon ...
[ ok ]
* Not starting iptables. First create some rules then run:
* /etc/init.d/iptables save
* ERROR: iptables failed to start
* Starting laptop_mode ...
[ ok ]
* Bringing up interface enp0s25
cat: /sys/class/net/wlp3s0/device/enable: No such file or directory
/usr/share/laptop-mode-tools/modules/wireless-iwl-power: line 29: [: too many arguments
cat: /sys/class/net/wlp3s0/device/enable: No such file or directory
/usr/share/laptop-mode-tools/modules/wireless-iwl-power: line 29: [: too many arguments
* Starting ifplugd on enp0s25 ...
[ ok ]
* Backgrounding ...
* WARNING: net.enp0s25 has started, but is inactive
* Bringing up interface wlp3s0
* Starting wpa_supplicant on wlp3s0 ...
* /etc/wpa_supplicant/wpa_supplicant.conf not found
[ !! ]
* ERROR: net.wlp3s0 failed to start
* Setting clock via the NTP client 'ntpdate' ...
Error resolving 0.gentoo.pool.ntp.org: System error (-11)
Error resolving 1.gentoo.pool.ntp.org: System error (-11)
Error resolving 2.gentoo.pool.ntp.org: System error (-11)
Error resolving 3.gentoo.pool.ntp.org: System error (-11)
* Failed to set clock
[ !! ]
* ERROR: ntp-client failed to start
* Starting ntpd ...
[ ok ]
* Starting local
[ ok ]

rc default logging stopped at Sun May 25 12:16:05 2014


rc shutdown logging started at Sun May 25 12:21:01 2014

* Stopping local
[ ok ]
* Saving random seed ...
[ ok ]
* Deactivating additional swap space ...
[ ok ]
* Stopping ntpd ...
[ ok ]
* Stopping laptop_mode ...
[ ok ]
cat: /sys/class/net/wlp3s0/device/enable: No such file or directory
/usr/share/laptop-mode-tools/modules/wireless-iwl-power: line 29: [: too many arguments
cat: /sys/class/net/wlp3s0/device/enable: No such file or directory
/usr/share/laptop-mode-tools/modules/wireless-iwl-power: line 29: [: too many arguments
* Stopping Hard Drive Active Protection System daemon ...
[ ok ]
* Stopping gpm ...
[ ok ]
* Storing ALSA Mixer Levels ...
[ ok ]
* Stopping acpid ...
[ ok ]
* Stopping metalog ...
[ ok ]
* Unmounting loop devices
* Unmounting filesystems
* Unmounting /boot ...
[ ok ]
* Unmounting /usr/portage ...
[ ok ]
* Unmounting /usr/src ...
[ ok ]
* Unmounting /home ...
[ ok ]
* Unmounting /var ...
[ ok ]
* Unmounting /selinux ...
[ ok ]
* Deactivating swap devices ...
[ ok ]
* Stopping udev ...
[ ok ]
* Setting hardware clock using the system clock [UTC] ...
[ ok ]

rc shutdown logging stopped at Sun May 25 12:21:05 2014


Selinux
Should first emerge -uDN world with "selinux" USE flag, otherwise rlpkg would be failed.
Quote:

localhost mnt # rlpkg -a -r
Relabeling filesystem types: btrfs encfs ext2 ext3 ext4 ext4dev f2fs gfs gfs2 gpfs jffs2 jfs lustre xfs zfs
Running /usr/sbin/setfiles -F /etc/selinux/strict/contexts/files/file_contexts / /var /home /usr/src /usr/portage
/usr/sbin/setfiles set context /->kernel failed:'Operation not supported'
/usr/sbin/setfiles set context /var->kernel failed:'Operation not supported'
/usr/sbin/setfiles set context /home->kernel failed:'Operation not supported'
/usr/sbin/setfiles set context /usr/src->kernel failed:'Operation not supported'
/usr/sbin/setfiles set context /usr/portage->kernel failed:'Operation not supported'
Scanning for shared libraries with text relocations...
0 libraries with text relocations, 0 not relabeled.
Scanning for PIE binaries with text relocations...
0 binaries with text relocations detected.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6227
Location: Room 101

PostPosted: Sun May 25, 2014 1:18 pm    Post subject: Re: My Gentoo Installation Note Reply with quote

XQZS wrote:
Script for wine

XQZS ... some comments:

XQZS wrote:
Code:
param=''
 
# get the correct file name that maybe include space
   for file in $@
   do 
     param="$param $file"
   done   
   filename=${param:1}
   checkfilename="$filename"

There are various methods for input validation ... you shouldn't need to do anything like the above.

Code:
for file in "$@" ; do
   read -rd '' file <<< "$file"
done

XQZS wrote:
Code:
# if the file path is not full path, we should expand it
   if [ ! `echo $filename | grep ^/` ]; then
     filename="$(pwd)/$filename"
   fi

If you want the full path then simply define it ...

Code:
file="$(readlink -f $file)"

HTH & best ... khay
Back to top
View user's profile Send private message
XQZS
n00b
n00b


Joined: 20 Oct 2013
Posts: 56

PostPosted: Wed May 28, 2014 2:15 am    Post subject: Re: My Gentoo Installation Note Reply with quote

khayyam wrote:
XQZS wrote:
Script for wine

XQZS ... some comments:

XQZS wrote:
Code:
param=''
 
# get the correct file name that maybe include space
   for file in $@
   do 
     param="$param $file"
   done   
   filename=${param:1}
   checkfilename="$filename"

There are various methods for input validation ... you shouldn't need to do anything like the above.

Code:
for file in "$@" ; do
   read -rd '' file <<< "$file"
done

XQZS wrote:
Code:
# if the file path is not full path, we should expand it
   if [ ! `echo $filename | grep ^/` ]; then
     filename="$(pwd)/$filename"
   fi

If you want the full path then simply define it ...

Code:
file="$(readlink -f $file)"

HTH & best ... khay

Thank you, khayyam!
But I wonder which is more efficient, I mean which is faster to open a PDF file?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
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