Porteus install on HDD with Xfce desktop

Here you can post about non-standard installation methods
(for example when using grub4dos).
User avatar
justwantin
Black ninja
Black ninja
Posts: 51
Joined: 09 Oct 2011, 19:10
Location: Melbourne, Oz

Porteus install on HDD with Xfce desktop

Post#1 by justwantin » 27 Nov 2011, 22:03

My interest in using Porteus stems from ownng an Acer Aspire One 751h. The poulsbo chipset that comes with this netbook provides marginal graphics performance without a bit of hacking. However, Porteus-1.1 will ship with kernel mods and use fbdev to provide the best video performance I've experienced on this netbook to date.

Porteus is a live distro intended to be run off USB sticks and such but it can also be installed to a HDD and used as a permanently installed OS. In my case, with the improved poulsbo graphics, it provides better all around perfomance than any other Linux distro I have tried so it has been installed it as the primary O.S. on this netbook. This type of installation is called a frugal install.

I have installed using Porteus-1.1-rc2 and the Xfce desktop environment which, while not officially supported, is my personal preference. What follows is how I installed to my HDD and did my initial set up. It will contain minimal explanation to keep it short but should give enough information so that someone else with a bit of Linux experience can do the something similar. I use Midnight Commander (mc) and its editor (mcedit) in a terminal so I will not provide commands for things like copy and edit, just assume I'm using Midnight Commander.

##############################
# Initial USB installation:

1) Download Porteus-1.1 32bit rc-2 and copy /boot and base to a USB stick as per instructions.

2) Download the most recent version of the Xfce module found at http://www.mediafire.com/?09kaofcm658u12b . Create a folder, /porteus/modules, on the USB stick and copy the Xfce module into it.

3) I'm not interested in running any KDE applications, so I will also create a folder, /porteus/optional, on the USB stick and copy all the kde modules in /porteus/base to it. This is optional and the kde modules could also just be deleted to conserve space on the USB stick. I'll keep the lxde module in /base so that I can use the Leafpad editor plus there is a dependency in that module required to run the Xfce terminal.

4) I can now boot using the USB stick I will have to select Text_mode because that will run xconf at boot and I will have decent graphics with my poulsbo chip.

##############################
# Setting up on HDD:

5) I had formatted my HDD with several Ext4 partitions plus a swap partition. Swap probably isn't needed but it won't hurt to have a little extra swap memory. Once I have booted live I can copy /boot and /porteus from /mnt/sdb1 (my USB stick) to /mnt/sda1 (my HDD)

6) In order to boot from the HDD I willy need to install a lilo bootloader to the MBR on /dev/sda1. To do this I will open /mnt/sda1/boot/lilo.conf and edit the first line to read boot=/dev/sda. I will then modify the Text_mode stanza as shown below
# text
image=/boot/vmlinuz
initrd=/boot/initrd.xz
label="Text_mode"
append = "autoexec=xconf telinit~3"

7) Run the command /sbin/lilo. There should be no errors and with lilo installed to the MBR on sda1 I can reboot into Porteus running from the HDD when I remove the USB stick.

##############################
# Post install configuration

8) Once running from the HDD I will create a lilo.conf more suitable for my use. Note the lilo.conf below is set up for my netbook and provides for changes to be saved to disk. My new lilo.conf will be saved as /etc/lilo.conf but it will not remain in /etc when I shutdown this session because changes will not be saved until I after i have run /sbin/lilo again and reboot configured for persistent changes.
boot=/dev/sda
prompt
timeout=100
large-memory
lba32
compact
change-rules
reset
install=menu
menu-scheme = Wb:Yr:Wb:Wb
menu-title = "Porteus Boot-Manager"
default = "Xfce"

image=/boot/vmlinuz
initrd=/boot/initrd.xz
label= "Xfce"
vga=791
append = "xfce autoexec=xconf telinit~4 changes=/porteus"

9) Once I have rebooted into Porteus on sda1 I can begin the rest of my setup since all changes will now be saved to disk. Howver, I will not have booted into Xfce in runlevel 4 (telinit~4). To do this I will rename /etc/rc.d/rc.4 to /etc/rc.d/rc.4-original (in case I want to use it again) and then copy /etc/rc.d/rc.4.xfce and save it as /etc/rc.d/rc.4.

10) My netbook will now boot into Xfce with Guest as the default user. I want the machine to open an X session with a login manager and so I will next make some changes to /etc/slim.conf.
a) change the sessions line to lxde,xfce
b) delete guest from the default_user line
c) change auto_login line from yes to no

11) I will next create a user for myself using the command adduser and following the prompts. It is important to hit the up arrow when prompted to list additional groups and then hit enter. If a user does not belong to those additional groups they may have problems later on. For me I'll also add the group lp or else I'll have trouble with my HP printers and scanner.

12) When I log in as the newly created user I will be presented with a rather bland default Xfce desktop so in order to have the shiney new default desktop configs that the Guest user has I need to replace ~/.config with /home/guest/.config/ and than change the permissions from guest:users to [new user]:users.

#######################################
# Whats next?

This will have provided a HDD install that boots and works similar to a "normal" HDD install. However, this is frugal install and except for the changes made after the HDD Porteus was running with persistent changes it is still running as it would if booting from a usb running from ram and using inserted modules instead of installed software. I don't mind that and indeed I think this little netbook works a little bit faster because of it.

I will need or want to install additional software to suit use but I will install the software as modules not as packages to the HDD. I'll probably also play around with setting up some magic folders, changing to a newer stronger root password, etc. However, that's all explained elsewhere and I'll close this HowTo here.
Last edited by justwantin on 28 Nov 2011, 20:28, edited 1 time in total.

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Porteus install on HDD with Xfce desktop

Post#2 by Ahau » 28 Nov 2011, 16:35

justwantin,

Great!!

Just a couple minor suggestions --

1) please point readers to the 'XFCE collaboration' thread to download the module: http://forum.porteus.org/viewtopic.php? ... 7fe0339113
as the version you linked to directly will become outdated and get pulled from mediafire in the not-so-distant future... I've already fixed a couple more bugs :)

2) I'd suggest copying the entire /porteus folder onto the USB drive, rather than just pulling the /porteus/base folder. There's really not much dead weight there, and you won't have to create /modules, /optional, /rootcopy, etc. -- it will also make sure you get the .sgn file

3) When you use the 'xfce' cheatcode and boot into init 4 (as shown in your final lilo configuration), /etc/rc.d/rc.4 should automatically be replaced by /etc/rc.d/rc.4.xfce, with a backup saved. When you exit init 4, the original rc.4 will be replaced (in order to remove modifications for those who are using saved changes and don't want my customizations hanging around when they aren't using xfce). This action takes place within /etc/rc.d/init.d/xfce.sh (symlinked to ../rcS.d/S-xfce and ../rc4.d/K-xfce), and if it's not working, then I've done something wrong :oops:

Please test it in always fresh mode (just remove the changes= cheatcode at boot time) and let me know if it works for you. You need to use always fresh because xfce.sh won't modify rc.4 if it already contains the word 'xfce', as it will assume that it's already been customized. If you have a chance to test it, please report back in the XFCE collaboration thread, as I don't want to derail your thread ;)

Thank you very much for this HOWTO! I always love seeing how people customize Porteus for their needs, and this is sure to help someone who is looking to do something similar (especially the tip about using xconf to get graphics working better with poulsbo).

Cheers!
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
fanthom
Moderator Team
Moderator Team
Posts: 5666
Joined: 28 Dec 2010, 02:42
Distribution: Porteus Kiosk
Location: Poland
Contact:

Re: Porteus install on HDD with Xfce desktop

Post#3 by fanthom » 28 Nov 2011, 18:07

just to mention that all commands for "autoexec=" cheatcode must be separated with ';'
Example:

Code: Select all

"autoexec=xconf;telinit~3"
please fix the HOWTO.
Please add [Solved] to your thread title if the solution was found.

User avatar
justwantin
Black ninja
Black ninja
Posts: 51
Joined: 09 Oct 2011, 19:10
Location: Melbourne, Oz

Re: Porteus install on HDD with Xfce desktop

Post#4 by justwantin » 28 Nov 2011, 19:16

Ok, Ill see to the changes later today.
I'd suggest copying the entire /porteus folder onto the USB drive, rather than just pulling the /porteus/base folder. There's really not much dead weight there, and you won't have to create /modules, /optional, /rootcopy, etc. -- it will also make sure you get the .sgn file
I had meant to say /porteus but my thoughts must've gotten ahead of me, I was writing from memory. Also there are no /modules and /optional directories in /porteus on my rc-2 iso.
/etc/rc.d/rc.4 should automatically be replaced by /etc/rc.d/rc.4.xfce, with a backup saved.
Now I know where that /etc/rc.d/rc.4.old came from.

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Re: Porteus install on HDD with Xfce desktop

Post#5 by brokenman » 02 Dec 2011, 13:28

Great work. Ahau perhaps you could open a google code page to ensure all versions are not vanished. I already have a porteus googlecode account you can use if you wish, but probably a dedicated one would be better.
How do i become super user?
Wear your underpants on the outside and put on a cape.

Post Reply