[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 110: Undefined array key "cached"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 111: Undefined array key "normal"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 112: Undefined array key "total"
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3391: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3393: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3394: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3395: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
Cabrillo College Linux Classes • View topic - Lab2-step1-6. copy boot and 7.edit fstab

Lab2-step1-6. copy boot and 7.edit fstab

UNIX/Linux Installation & Configuration

Lab2-step1-6. copy boot and 7.edit fstab

Postby mary talpas on Mon Sep 22, 2008 11:15 pm

do i copy the boot folder i just created to my pen drive in this step or later?

I am having trouble finding the commands to edit fstab file. help..

Mary
mary talpas
 
Posts: 40
Joined: Tue Sep 02, 2008 8:31 pm

Re: Lab2-step1-6. copy boot and 7.edit fstab

Postby mary talpas on Tue Sep 23, 2008 9:30 am

i found the answer to how to edit fstab
mary talpas
 
Posts: 40
Joined: Tue Sep 02, 2008 8:31 pm

share?

Postby Leif Husman on Tue Sep 23, 2008 10:39 am

how?
Leif Husman
 
Posts: 47
Joined: Tue Sep 02, 2008 7:14 pm

Re: Lab2-step1-6. copy boot and 7.edit fstab

Postby Kayla Smith on Tue Sep 23, 2008 10:41 am

Mary,

I put the following line in my /etc/fstab file

[code]/dev/sdb1 / ext3 defaults 1 1[/code]

And removed the line in that file that was mounted on / and the line that said swp on it.
Kayla Smith
 
Posts: 67
Joined: Tue Sep 02, 2008 7:11 pm

Re: Lab2-step1-6. copy boot and 7.edit fstab

Postby Rich Simms on Tue Sep 23, 2008 1:07 pm

I updated page 7 of the Howto at [url]http://simms-teach.com/howtos/115-fedora-9-usb-boot.pdf[/url] to clarify. You need to do what Kayla noted above. Also, remove the swap entry.

- Rich
User avatar
Rich Simms
Site Admin
 
Posts: 640
Joined: Thu May 15, 2008 2:44 pm

Re: Lab2-step1-6. copy boot and 7.edit fstab

Postby Fred Miles on Tue Sep 23, 2008 1:50 pm

Rich,

After editing fstab and remaking the initrd.img is there anything else that needs to be redone after that, if the file system was created with the original fstab file data?
Cheers,
/~fred
User avatar
Fred Miles
 
Posts: 12
Joined: Tue Sep 02, 2008 6:07 pm
Location: Scotts Valley

yeah, but why?

Postby Leif Husman on Tue Sep 23, 2008 2:21 pm

I have just one question: what if the next time I boot this usb drive is sdc instead of sdb?
Leif Husman
 
Posts: 47
Joined: Tue Sep 02, 2008 7:14 pm

Re: Lab2-step1-6. copy boot and 7.edit fstab

Postby Kayla Smith on Tue Sep 23, 2008 2:26 pm

Actually could you talk more about the mkinitrd command in class? From my point of view it seems like magic that I copy and paste onto the command line.

I found the man page, which sort of helps, but there seem to be a lot of parts involved that I don't know about yet.

[quote]mkinitrd creates an initial image used by the kernel for preloading the block device modules (such as IDE, SCSI or RAID) which are needed to
access the root filesystem. mkinitrd automatically loads filesystem modules (such as ext3 and jbd), IDE modules, all scsi_hostadapter entries
in /etc/modprobe.conf, and raid modules if the system's root partition is on raid, which makes it simple to build and use kernels using modu-
lar device drivers.[/quote]
Kayla Smith
 
Posts: 67
Joined: Tue Sep 02, 2008 7:11 pm

Re: Lab2-step1-6. copy boot and 7.edit fstab

Postby Rich Simms on Wed Sep 24, 2008 8:36 am

Rabbit,

That is a really good point. You can use /dev/sdb1 just to get things up and working quickly on the Lab or Class systems. However "hardcoding" an absolute drive number and partition number on the pen drive will cause it to fail on other systems (like one with 2 SCSI hard drives). The LABEL= option makes it more robust (as long as you named and specify your file system volume name, i.e. label, correctly).

Fred,
After editing fstab to remove the swap entry and correcting all references to pen drive partitions you can make your initial ram disk (with mkinitrd) and go to next step.

All,

This is cool ... if you want to view at the contents of your ramdisk you should check out slide 87 of Lesson 3 or look at this example:

[code][root@duke mnt]# mkinitrd --fstab=/mnt/etc/fstab --with-usb /mnt/boot/initrd.img $(uname -r)
[root@duke mnt]# cd /tmp
[root@duke tmp]# mkdir initrd
[root@duke tmp]# cd initrd
[root@duke initrd]# cat /mnt/boot/initrd.img | gzip -d | cpio -i
14435 blocks
[root@duke initrd]#[root@duke initrd]# ls -R
.:
bin dev etc init initrd.img lib proc sbin sys sysroot usr

./bin:
insmod modprobe nash rmmod

./dev:
console ptmx ram1 tty tty10 tty2 tty5 tty8 ttyS1 zero
mapper ram rtc tty0 tty11 tty3 tty6 tty9 ttyS2
null ram0 systty tty1 tty12 tty4 tty7 ttyS0 ttyS3

./dev/mapper:

./etc:
ld.so.cache ld.so.conf ld.so.conf.d

./etc/ld.so.conf.d:

./lib:
ata_piix.ko libdl-2.7.so libz.so.1
ehci-hcd.ko libdl.so.2 libz.so.1.2.3
ext3.ko libgcc_s-4.1.2-20070925.so.1 mbcache.ko
firmware libgcc_s.so.1 mptbase.ko
i686 libglib-2.0.so.0 mptscsih.ko
jbd.ko libglib-2.0.so.0.1400.2 mptspi.ko
ld-2.7.so libm.so.6 ohci-hcd.ko
ld-linux.so.2 libpopt.so.0 scsi_mod.ko
libata.ko libpopt.so.0.0.0 scsi_transport_spi.ko
libblkid.so.1 libresolv-2.7.so scsi_wait_scan.ko
libblkid.so.1.0 libresolv.so.2 sd_mod.ko
libcrypto.so.0.9.8b libselinux.so.1 uhci-hcd.ko
libcrypto.so.6 libsepol.so.1 usb-storage.ko
libc.so.6 libuuid.so.1
libdevmapper.so.1.02 libuuid.so.1.2

./lib/firmware:

./lib/i686:
nosegneg

./lib/i686/nosegneg:
libc-2.7.so libm-2.7.so

./proc:

./sys:

./sysroot:

./usr:
lib

./usr/lib:
libbdevid.so.6.0.19 libdhcp.so.1 libnl.so.1.0-pre5
libdhcp4client-3.0.6.so.0 libnash.so.6.0.19 libparted-1.8.so.6
libdhcp6client-0.10.so.0 libnl.so.1 libparted-1.8.so.6.0.0
[root@duke initrd]#[/code]

As you can see, the ramdisk is providing the kernel with a small root file system to use during the startup process. All this is happening before the root file system we created on the pen drive is even mounted!

- Rich
User avatar
Rich Simms
Site Admin
 
Posts: 640
Joined: Thu May 15, 2008 2:44 pm


Return to CIS 191A - Fall 2008

Who is online

Users browsing this forum: No registered users and 0 guests

cron